From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Millar Subject: Re: Infinite loop using :post header argument that calls a emacs-lisp src block Date: Thu, 30 Jul 2015 22:22:13 -0400 Message-ID: <55BADBD5.2010708@verizon.net> References: <55BAD42D.2080103@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKzxx-0006dl-MC for emacs-orgmode@gnu.org; Thu, 30 Jul 2015 22:22:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKzxu-0008U5-G7 for emacs-orgmode@gnu.org; Thu, 30 Jul 2015 22:22:33 -0400 Received: from vms173021pub.verizon.net ([206.46.173.21]:41693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKzxu-0008U0-CR for emacs-orgmode@gnu.org; Thu, 30 Jul 2015 22:22:30 -0400 Received: from [192.168.1.128] ([70.209.134.172]) by vms173021.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0NSB00II5YL1MR70@vms173021.mailsrvcs.net> for emacs-orgmode@gnu.org; Thu, 30 Jul 2015 21:22:14 -0500 (CDT) In-reply-to: <55BAD42D.2080103@verizon.net> 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: "emacs-orgmode@gnu.org" I neglected to mention that the elisp code is based on Miguel Ruiz's post to this list earlier today. On 07/30/2015 09:49 PM, Charles Millar wrote: > emacs version GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version > 3.10.7) of 2014-03-07 on lamiak, modified by Debian > Org-mode version 8.3beta (release_8.3beta-1302-g00142f @ > /usr/share/emacs/site-lisp/org-mode/lisp/) > > the following produces a table with header, hline, a row with TOTAl > and #+TBLFM immediately after the table > > #+NAME: SCHEDAP > #+begin_src rec :data foo.rec :type bar :fields > AssetDate,Description,Basis :results silent > (some recutils sexes) > #+end_src > #+NAME: SCHEDA > #+begin_src emacs-lisp :var table=SCHEDAP :export results > (setq table (cons 'hline table)) > (setq table (cons '("Date" "Description" "Basis") table)) > (setq table (append table '(("|Total")))) > (setq table (append table '(("\n#+TBLFM: > @>$>=vsum(@I$>..@>>$>);%.2f::")))) > table > #+end_src > #+TBLNAME: SCHEDA > > What I would like to use is > > #+NAME: insertstuff > #+begin_src emacs-lisp :var table=() :results silent > (setq table (cons 'hline table)) > (setq table (cons '("Date" "Description" "Basis") table)) > (setq table (append table '(("|Total")))) > (setq table (append table '(("\n#+TBLFM: > @>$>=vsum(@I$>..@>>$>);%.2f::")))) > table > #+end_src > > > #+NAME: SCHEDA > #+begin_src rec :data foo.rec :type bar :fields > AssetDate,Description,Basis :post insertstuff :var table=SCHEDA > (some recutils sexes) > #+end_src > #+TBLNAME: SCHEDA > > which results in an infinite loop, or so it appears. > > What am I missing? Or, is the first example my only choice? > > Charlie Millar > >