emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Infinite loop using :post header argument that calls a emacs-lis


From: Charles Millar
Subject: Re: [O] Infinite loop using :post header argument that calls a emacs-lisp src block
Date: Thu, 30 Jul 2015 22:22:13 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

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






reply via email to

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