emacs-orgmode
[Top][All Lists]
Advanced

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

[O] PROPERTIES attached to results blocks - Was: Set or update timestamp


From: Rainer M Krug
Subject: [O] PROPERTIES attached to results blocks - Was: Set or update timestamp after evaluation of code block?
Date: Tue, 22 Sep 2015 09:56:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

Grant Rettke <address@hidden> writes:

> Might be nice to have properties attached to result blocks. That is a nice 
> idea.

True. These could be used for in the long run many
purposes, like formating for export. If the formating would be defined
in the properties of the result block, it would make it easy to have
different formating for export when using multiple result blocks.

Rainer


> Grant Rettke
> --
> address@hidden | 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 immeasurably better since I have been forced to stop
> taking it seriously.” --Thompson
>
>
> On Mon, Sep 21, 2015 at 1:43 PM, Rainer M Krug <address@hidden> wrote:
>> John Kitchin <address@hidden> 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('hello')
>>> #+END_SRC
>>>
>>> #+RESULTS:
>>> : Last run: [2015-09-21 Mon 11:09:18]
>>> : hello
>>
>> Thanks John - that looks nice and I like the idea of using
>> (current-time) and the possibility to format the time string, but this
>> info will be part of the export - and I only would like tho have the
>> info in the org file and not in the exported document.
>>
>>
>> Rainer
>>
>>>
>>>
>>>
>>> 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
>>> 412-268-7803
>>> @johnkitchin
>>> http://kitchingroup.cheme.cmu.edu
>>
>> --
>> 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

-- 
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

Attachment: signature.asc
Description: PGP signature


reply via email to

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