From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: can babel results show time of evaluation? Date: Wed, 30 Jan 2013 10:09:35 -0700 Message-ID: <87libawqb4.fsf@gmail.com> References: <87haly2aag.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0bAb-0002ml-HF for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 12:09:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0bAY-0003em-DB for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 12:09:57 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:42905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0bAY-0003eW-5O for emacs-orgmode@gnu.org; Wed, 30 Jan 2013 12:09:54 -0500 Received: by mail-pa0-f45.google.com with SMTP id bg2so1195360pad.32 for ; Wed, 30 Jan 2013 09:09:53 -0800 (PST) In-Reply-To: (Thomas Alexander Gerds's message of "Wed, 30 Jan 2013 13:26:00 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Thomas Alexander Gerds Cc: Bastien , emacs-orgmode@gnu.org Hi Thomas, I've just pushed this functionality up to the main branch. To make use of it add the following to your Emacs config. (setq org-babel-hash-show-time t) It works for me in some simple tests, and I can confirm that with this variable set to nil, I get no new failures in the Org-mode test suite, so it shouldn't introduce any problems. Thanks for suggesting this functionality, Thomas Alexander Gerds writes: > Hi Bastien, > > thanks for you reply, in particular for showing how to avoid > org-insert-time-stamp to convert the current-time into a string. > > I should have said more clearly what I had in mind with this. I was > thinking of a reproducible report or manuscript with R source blocks > that produce some results. Here org babel allows one to enable caching > for some or all source-blocks. My proposal has two advantages: > > 1) when visiting the cached results of a particular block after some > time, e.g. one year later, it would be visible *when* the block was > evaluated. This can be useful, e.g., when there are several versions of > the same dataset which are used to produce the cached results. > > 2) sometimes it may be unclear which blocks are evaluated when running > org-babel-execute-buffer or org-export-as-x, in particular for org-babel > novices. Thus, showing the evaluation time in the results header will > help to learn how caching works. > > Cheers > Thomas > > > > > > > Bastien writes: > >> Hi Thomas, >> >> Thomas Alexander Gerds writes: >> >>> (when hash (concat "[["hash"][" (with-temp-buffer >>> (org-insert-time-stamp (current-time) 'hm)) "]]")) >>> but, not sure if that is a good idea and what other changes this >>> would require. >> >> I'm not sure too (both whether this is a good idea and whether this >> would trigger other changes)... but I'd say this is a very specific >> need, and it can be fulfilled by asking the code to insert a timestamp >> into the exported results, right? >> >> See for e.g.: >> #+BEGIN_SRC emacs-lisp :results raw >> (message ";; %s" (format-time-string (cdr org-time-stamp-custom-formats))) >> #+END_SRC >> HTH, > -- > -- Eric Schulte http://cs.unm.edu/~eschulte