[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: John Kitchin
Subject: Re: [O] Set or update timestamp after evaluation of code block?
Date: Mon, 21 Sep 2015 11:10:00 -0400

Here is one approach:

#+name: update-timestamp
#+BEGIN_SRC emacs-lisp :var data=""
 "Last run: "
 (format-time-string "[%Y-%m-%d %a %H:%M:%S]" (current-time))
 "\n" data)

#+BEGIN_SRC python :post update-timestamp(data=*this*)

: Last run: [2015-09-21 Mon 11:09:18]
: hello

Rainer M Krug writes:

> Eric S Fraga <address@hidden> 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 argument to invoke emacs lisp and
>> execute org-time-stamp-inactive in some way?
> Thanks - sounds possible? But if I just use
> ,----
> | :post (org-time-stamp-inactive)
> `----
> 1) an input is required and
> 2) the time stamp is inserted before the #+begin_src and makes the block
> invalid.
> 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?
> Thanks,
> Rainer

Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213

reply via email to

[Prev in Thread] Current Thread [Next in Thread]