[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Set or update timestamp after evaluation of code block?
From: |
Rainer M Krug |
Subject: |
Re: [O] Set or update timestamp after evaluation of code block? |
Date: |
Mon, 21 Sep 2015 20:37:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) |
address@hidden (Jorge A. Alfaro-Murillo) writes:
> 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?
>
> You could use the :epilogue header argument. Since you want after the
> #+end_src this is rather hackish:
>
> :epilogue (save-excursion (re-search-forward "END_SRC" nil nil 2)
> (org-insert-time-stamp (current-time) t t "\nEvaluated: " "\n"))
>
> It does not update the results, but it will show you all the results
> and when they were evaluated.
>
> If you want to keep only one set of results and do not mind having the
> timestamp before the #+BEGIN_SRC, you could use something like:
>
> :epilogue (save-excursion (if (re-search-backward "Last evaluated: "
> nil t) (kill-line 1)) (org-insert-time-stamp (current-time) t t "Last
> evaluated: " "\n"))
The :epilogue won't work, as the source code block is in R and the
epilogue is appended to the code.
But I will look at the elisp code
Thanks,
Rainer
>
> Best,
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: address@hidden
Skype: RMkrug
PGP: 0x0F52F982
signature.asc
Description: PGP signature
- Re: [O] Set or update timestamp after evaluation of code block?, (continued)
- Re: [O] Set or update timestamp after evaluation of code block?, Rainer M Krug, 2015/09/21
- Re: [O] Set or update timestamp after evaluation of code block?, John Kitchin, 2015/09/21
- Re: [O] Set or update timestamp after evaluation of code block?, Rainer M Krug, 2015/09/21
- Re: [O] Set or update timestamp after evaluation of code block?, John Kitchin, 2015/09/21
- Re: [O] Set or update timestamp after evaluation of code block?, Rainer M Krug, 2015/09/22
- Re: [O] Set or update timestamp after evaluation of code block?, Rainer M Krug, 2015/09/22
- Re: [O] Set or update timestamp after evaluation of code block?, Grant Rettke, 2015/09/21
- [O] PROPERTIES attached to results blocks - Was: Set or update timestamp after evaluation of code block?, Rainer M Krug, 2015/09/22
- Re: [O] PROPERTIES attached to results blocks - Was: Set or update timestamp after evaluation of code block?, Charles C. Berry, 2015/09/22
- Re: [O] Set or update timestamp after evaluation of code block?, Jorge A. Alfaro-Murillo, 2015/09/21
- Re: [O] Set or update timestamp after evaluation of code block?,
Rainer M Krug <=