Re: [O] Set or update timestamp after evaluation of code block?

2015-09-22 Thread Rainer M Krug
Rainer M Krug writes: > John Kitchin writes: > >> so picky ;) > > Jup - aren't all org users like that? > >> Maybe something like this will put that stamp in a comment >> that won't export. >> >> #+BEGIN_SRC emacs-lisp >> (defun j-add-ts () >> (save-excursion >> (re-search-forward "#\\+END

Re: [O] Set or update timestamp after evaluation of code block?

2015-09-22 Thread Rainer M Krug
John Kitchin writes: > so picky ;) Jup - aren't all org users like that? > Maybe something like this will put that stamp in a comment > that won't export. > > #+BEGIN_SRC emacs-lisp > (defun j-add-ts () > (save-excursion > (re-search-forward "#\\+END_SRC") > (forward-line) > (begi

Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Grant Rettke
Might be nice to have properties attached to result blocks. That is a nice idea. Grant Rettke -- g...@wisdomandwonder.com | http://www.wisdomandwonder.com/ “Wisdom begins in wonder.” --Socrates “All creativity is an extended form of a joke.” --Kay ((λ (x) (x x)) (λ (x) (x x))) “Life has become imme

Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread John Kitchin
so picky ;) Maybe something like this will put that stamp in a comment that won't export. #+BEGIN_SRC emacs-lisp (defun j-add-ts () (save-excursion (re-search-forward "#\\+END_SRC") (forward-line) (beginning-of-line) (when (looking-at "# Last run:") (kill-line)) (insert

Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Rainer M Krug
John Kitchin writes: > Here is one approach: > > #+name: update-timestamp > #+BEGIN_SRC emacs-lisp :var data="" > (concat > "Last run: " > (format-time-string "[%Y-%m-%d %a %H:%M:%S]" (current-time)) > "\n" data) > #+END_SRC > > > #+BEGIN_SRC python :post update-timestamp(data=*this*) > print(

Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Rainer M Krug
jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes: > Rainer M Krug writes: > >> Eric S Fraga writes: >> >>> On Monday, 21 Sep 2015 at 14:46, Rainer M Krug wrote: >>> >>> [...] >>> Is it possible to set a timestamp (ur update it when it exists already) when a code block h

Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Jorge A. Alfaro-Murillo
Rainer M Krug writes: Eric S Fraga writes: On Monday, 21 Sep 2015 at 14:46, Rainer M Krug wrote: [...] Is it possible to set a timestamp (ur update it when it exists already) when a code block has been evaluated, so that I have e record when it was updated? Could you make use of the :

Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Rainer M Krug
Eric S Fraga writes: > On Monday, 21 Sep 2015 at 15:42, Rainer M Krug wrote: > > [...] > >> How can I put the time stamp in the line after the #+end_src or possibly >> even in the same line, as this does not seem to have an impact on the >> source block? > > Above my pay grade unfortunately ;-)

Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread John Kitchin
Here is one approach: #+name: update-timestamp #+BEGIN_SRC emacs-lisp :var data="" (concat "Last run: " (format-time-string "[%Y-%m-%d %a %H:%M:%S]" (current-time)) "\n" data) #+END_SRC #+BEGIN_SRC python :post update-timestamp(data=*this*) print('hello') #+END_SRC #+RESULTS: : Last run: [20

Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Eric S Fraga
On Monday, 21 Sep 2015 at 15:42, Rainer M Krug wrote: [...] > How can I put the time stamp in the line after the #+end_src or possibly > even in the same line, as this does not seem to have an impact on the > source block? Above my pay grade unfortunately ;-) Sorry. Hopefully one of the emacs

Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Rainer M Krug
Eric S Fraga writes: > On Monday, 21 Sep 2015 at 14:46, Rainer M Krug wrote: > > [...] > >> Is it possible to set a timestamp (ur update it when it exists already) >> when a code block has been evaluated, so that I have e record when it >> was updated? > > Could you make use of the :post header a

Re: [O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Eric S Fraga
On Monday, 21 Sep 2015 at 14:46, Rainer M Krug wrote: [...] > Is it possible to set a timestamp (ur update it when it exists already) > when a code block has been evaluated, so that I have e record when it > was updated? Could you make use of the :post header argument to invoke emacs lisp and ex

[O] Set or update timestamp after evaluation of code block?

2015-09-21 Thread Rainer M Krug
Hi I have some code blocks which represent an sequence of fitting-analysis-plotting. But Sometimes I am loosing track which code blocks I have evaluated. Is it possible to set a timestamp (ur update it when it exists already) when a code block has been evaluated, so that I have e record when it w