From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: [BUG] on export resulting in endless evaluation Date: Tue, 10 Feb 2015 09:25:47 +0100 Message-ID: References: <86twyvbb86.fsf@example.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YL68t-0008FA-UM for emacs-orgmode@gnu.org; Tue, 10 Feb 2015 03:26:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YL68p-00075p-Jd for emacs-orgmode@gnu.org; Tue, 10 Feb 2015 03:25:59 -0500 Received: from mail-wi0-f182.google.com ([209.85.212.182]:60068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YL68p-00075b-98 for emacs-orgmode@gnu.org; Tue, 10 Feb 2015 03:25:55 -0500 Received: by mail-wi0-f182.google.com with SMTP id n3so23218927wiv.3 for ; Tue, 10 Feb 2015 00:25:54 -0800 (PST) In-Reply-To: (Charles Berry's message of "Tue, 10 Feb 2015 00:44:14 +0000 (UTC)") 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: Charles Berry Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Charles Berry writes: > Rainer M Krug krugs.de> writes: > >>=20 >> Sebastien Vauban >> writes: >>=20 >> > Rainer M Krug wrote: >> >> Charles Berry writes: >> >>> Rainer M Krug krugs.de> writes: >> >>>>=20 >> >>>> when exporting the fillowing org file, I get an endless loop of >> >>>> evaluations. >> >>>>=20 >> >>>> --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=20 >> >>>> cat(13+14) >> >>>> #+end_src >> >>>>=20 >> >>>> * and here only code >> >>>> :PROPERTIES: >> >>>> :header-args+: exports code >> >>>> :END: >> >>>> #+begin_src R=20 >> >>>> 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'=20 > > 5. The first string matched by `org-babel-multi-line-header-regexp' > > 1, 4 and 5 are strings. 2 and 3 are lists. Wow - there are many... But this helps quite a bit. > >>=20 > [more questions deleted] >>=20 > > Exactly what happens and when is a long story, involving a bunch of=20 > functions. > > You might start by reading `org-babel-get-src-block-info' and=20 > `org-babel-merge-params'. > > I think most of what you need to know really is in=20 > > (info "(org) Using header arguments") > and > (info "(org) Property syntax") > > Just remember that a property called `header-args' is a string until Babe= l=20 > starts working on it. So your original code, returns the "property called 'header-args'", (1) while your function below returns the one from 2) above. That clarifies. > > >> 5) Is there any way in getting, in this function, the same output >> (header-args) as from the code block suggested by Charles: >>=20 > > You might try Thanks - but I was thinking about the ot=3Dher way round, how I could get the "property called 'header-args'" (1) within the function called when using C-c C-v C-i to help in debugging - found a way of doing it and will send a patch. > #+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, Most definitely, Thanks, Rainer > > Chuck > > > =2D-=20 Rainer M. Krug email: Rainerkrugsde PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJU2cCQAAoJENvXNx4PUvmCl8AIAOiQXNpJ3okDZarra51ZJYO1 j0eGjckBaz7jfLJbIMnpWrxhj4s4upqoKlntaoDqW5nWx4EzUe4nSGAVrRiqWqxY lGW7uXzGmTCQon6fbLOH1HE2DFJn6Y05D74+LASkjMy2RO73lVC3W2VZ+wDWWxd5 7FAurCfDikpnboZy6lBs9emxnu9RbBF9LaG/I5eUuy2rFszZABZIw7fRaaZMt/ZQ 4Z7kCwha+IckEIlu8vQs8He5lN7CLciI6yDNG3410D0taO6kokUwT7/4dym3GwIO qm3rVK3lmB4xwowfu3W1/utDK2UUIaJJchwL9JJhLt04vc0Z4BuBkGccQtLoWO0= =LRii -----END PGP SIGNATURE----- --=-=-=--