From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: ':post' Direct execution via Emacs Lisp Date: Fri, 27 Mar 2015 09:31:08 -0700 Message-ID: References: <87y4mihloj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-806843023-1427473868=:603" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbXAE-0002ih-DC for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 12:31:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbXA6-0000Pa-W7 for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 12:31:18 -0400 Received: from iport-bcv1-out.ucsd.edu ([132.239.0.119]:50453) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbXA6-0000PD-N5 for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 12:31:10 -0400 In-Reply-To: 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: John Kitchin Cc: Daimrod , emacs-orgmode@gnu.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-806843023-1427473868=:603 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT 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 --0-806843023-1427473868=:603--