From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: Re: [BUG] on export resulting in endless evaluation Date: Tue, 10 Feb 2015 00:44:14 +0000 (UTC) Message-ID: References: <86twyvbb86.fsf@example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKywJ-00006M-48 for emacs-orgmode@gnu.org; Mon, 09 Feb 2015 19:44:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKywF-00012A-UA for emacs-orgmode@gnu.org; Mon, 09 Feb 2015 19:44:31 -0500 Received: from plane.gmane.org ([80.91.229.3]:52407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKywF-000120-OP for emacs-orgmode@gnu.org; Mon, 09 Feb 2015 19:44:27 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YKywC-0000Bo-LZ for emacs-orgmode@gnu.org; Tue, 10 Feb 2015 01:44:25 +0100 Received: from 172-7-166-26.lightspeed.sndgca.sbcglobal.net ([172.7.166.26]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Feb 2015 01:44:24 +0100 Received: from ccberry by 172-7-166-26.lightspeed.sndgca.sbcglobal.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Feb 2015 01:44:24 +0100 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 Rainer M Krug krugs.de> writes: > > Sebastien Vauban > writes: > > > Rainer M Krug wrote: > >> Charles Berry writes: > >>> Rainer M Krug krugs.de> writes: > >>>> > >>>> when exporting the fillowing org file, I get an endless loop of > >>>> evaluations. > >>>> > >>>> --8<---------------cut here---------------start------------->8--- > >>>> #+PROPERTY: header-args :exports both > >>>> #+PROPERTY: header-args+ :results output > >>>> * The bug > >>>> This file create an (possibly endless?) loop during export > >>>> * here exports both > >>>> #+begin_src R > >>>> cat(13+14) > >>>> #+end_src > >>>> > >>>> * and here only code > >>>> :PROPERTIES: > >>>> :header-args+: exports code > >>>> :END: > >>>> #+begin_src R > >>>> paste(13+14) > >>>> #+end_src > >>>> --8<---------------cut here---------------end--------------->8--- > >>> [discussion of problem, diagnostic methods, and cures deleted] > 1) I thought that header-args is simply a string, but it already seems > to be a list? Depends on which `header-args' one is discussing: 1. A property, as in `(org-entry-get (point) "header-args" t)' 2. The value of `(nth 2 (org-babel-get-src-block-info))' 3. The value of an elisp variable like `org-babel-default-header-args' 4. The 4th string matched by `org-babel-src-block-regexp' 5. The first string matched by `org-babel-multi-line-header-regexp' 1, 4 and 5 are strings. 2 and 3 are lists. > [more questions deleted] > Exactly what happens and when is a long story, involving a bunch of functions. You might start by reading `org-babel-get-src-block-info' and `org-babel-merge-params'. I think most of what you need to know really is in (info "(org) Using header arguments") and (info "(org) Property syntax") Just remember that a property called `header-args' is a string until Babel starts working on it. > 5) Is there any way in getting, in this function, the same output > (header-args) as from the code block suggested by Charles: > You might try #+BEGIN_SRC emacs-lisp :results pp (cons (org-entry-get (point) "header-args" t) (nth 2 (org-babel-get-src-block-info))) #+END_SRC HTH, Chuck