From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: PROPERTIES attached to results blocks - Was: Set or update timestamp after evaluation of code block? Date: Tue, 22 Sep 2015 09:56:59 +0200 Message-ID: References: <87pp1bsyhn.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeIRk-0005HB-UN for emacs-orgmode@gnu.org; Tue, 22 Sep 2015 03:57:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeIRi-0007Nh-7U for emacs-orgmode@gnu.org; Tue, 22 Sep 2015 03:57:04 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:38101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeIRh-0007NW-VR for emacs-orgmode@gnu.org; Tue, 22 Sep 2015 03:57:02 -0400 Received: by wiclk2 with SMTP id lk2so11042919wic.1 for ; Tue, 22 Sep 2015 00:57:01 -0700 (PDT) In-Reply-To: (Grant Rettke's message of "Mon, 21 Sep 2015 14:53:26 -0500") 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: Grant Rettke Cc: "emacs-orgmode@gnu.org" , John Kitchin --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Grant Rettke writes: > Might be nice to have properties attached to result blocks. That is a nic= e 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 > -- > gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/ > =E2=80=9CWisdom begins in wonder.=E2=80=9D --Socrates > =E2=80=9CAll creativity is an extended form of a joke.=E2=80=9D --Kay > ((=CE=BB (x) (x x)) (=CE=BB (x) (x x))) > =E2=80=9CLife has become immeasurably better since I have been forced to = stop > taking it seriously.=E2=80=9D --Thompson > > > On Mon, Sep 21, 2015 at 1:43 PM, Rainer M Krug wrote: >> John Kitchin writes: >> >>> Here is one approach: >>> >>> #+name: update-timestamp >>> #+BEGIN_SRC emacs-lisp :var data=3D"" >>> (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=3D*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 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 alrea= dy) >>>>>> 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 blo= ck >>>> invalid. >>>> >>>> How can I put the time stamp in the line after the #+end_src or possib= ly >>>> 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 Biolo= gy, 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: Rainer@krugs.de >> >> Skype: RMkrug >> >> PGP: 0x0F52F982 =2D-=20 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: Rainer@krugs.de Skype: RMkrug PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJWAQnLAAoJENvXNx4PUvmCgjQH/1e1k/W9/qLSwvVhP3zaSZpF vYbB16VH9hv/d9qRHbECjHPkNtZfMw0tElr3/ozpfO/KAq2R5MchXDs1eWVX839t 7Nb9dY6Kmy1F4cKFE0a56noFYykMJfLGVyrruWSu9qTM4KGGBGvk11LICZ8GmIa6 5p5w+dB8VEmCnV3lGhQuZMbA1CbMXA9wnK7tc6P/uUW9Bm8dQZrjnWkEPdoDMRbz d0fJCzFse7CvsbgROghLozGKUO0OOhmT0o3z1Y5SRuGM26CebL5i61FK+lNRR/Sp QImYRJOpVK7IpHd8vz06d/rHCDfhAEYe/7beqBNtfIM3scku5RtXDrgxPu1WX20= =LMNM -----END PGP SIGNATURE----- --=-=-=--