emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] ':post' Direct execution via Emacs Lisp


From: John Kitchin
Subject: Re: [O] ':post' Direct execution via Emacs Lisp
Date: Fri, 27 Mar 2015 15:26:15 -0400

that makes sense.

Charles C. Berry writes:

> On Fri, 27 Mar 2015, John Kitchin wrote:
>
>> I cannot see anyway to use direct execution of emacs lisp code in this
>> (and nothing I have tried actually works). Any emacs-lisp code seems to
>> get evaluated before running the block and *this* is not defined then.
>>
>
> The quoted part of the manual does suggest that lisp snippets should work
> like `:post (do-something *this*)'
>
> But perhaps *this* (pun intended) is what was meant: an emacs-lisp block
> can refer to `*this*' without needing to pass the value as a header
> argument.
>
>
> #+NAME: abc
> #+BEGIN_SRC emacs-lisp
> (concat *this* " and that")
> #+END_SRC
>
>
> #+BEGIN_SRC emacs-lisp :post abc()
> "T-H-I-S"
> #+END_SRC
>
> #+RESULTS:
> : T-H-I-S and that
>
>
>
> [snip]
>
>>> We can read in the manual:
>>> 14.8.2.25 ‘:post’
>>>
>>> The ‘:post’ header argument is used to post-process the results of a
>>> code block execution.  When a post argument is given, the results of the
>>> code block will temporarily be bound to the ‘*this*’ variable.  This
>>> variable may then be included in header argument forms such as those
>>> used in *note var:: header argument specifications allowing passing of
>>> results to other code blocks, or direct execution via Emacs Lisp.
>>>                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>
> Chuck

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



reply via email to

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