From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: [BUG] on export resulting in endless evaluation Date: Sat, 07 Feb 2015 15:46:56 +0100 Message-ID: References: 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]:51769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YK6f7-0006uR-Or for emacs-orgmode@gnu.org; Sat, 07 Feb 2015 09:47:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YK6f3-0005qr-Nn for emacs-orgmode@gnu.org; Sat, 07 Feb 2015 09:47:09 -0500 Received: from mail-wg0-f46.google.com ([74.125.82.46]:60800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YK6f3-0005pV-Bx for emacs-orgmode@gnu.org; Sat, 07 Feb 2015 09:47:05 -0500 Received: by mail-wg0-f46.google.com with SMTP id l2so18678336wgh.5 for ; Sat, 07 Feb 2015 06:47:04 -0800 (PST) In-Reply-To: (Charles Berry's message of "Fri, 6 Feb 2015 17:50:03 +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 >>=20 >> Hi >>=20 >> when exporting the fillowing org file, I get an endless loop of >> evaluations. >>=20 >> This happens with only orgmode and languages enabled >>=20 >> ,---- >> | GNU Emacs 24.4.1 (x86_64-apple-darwin14.0.0, Carbon Version 157 >> | Org-mode version 8.3beta (release_8.3beta-798-g528b90 =20=20 >> `---- >>=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--- >>=20 > > Add this to the end of your example and run the src block: > > > #+BEGIN_SRC emacs-lisp :results pp > (org-entry-get (point) "header-args" t) > #+END_SRC > > #+RESULTS: > : ":exports both :results output exports code" Very useful function - I think I will use it quite often! I would have seen the problem immediately - the missing : > > > > As you see the property API merely adds the `exports code' to the end of = the > "header-args"value. > > Babel then ignores the 'exports' I assume because it does not know it - which makes sense. > and you end up with `:results output code' which creates an executable > src block. Since :exports both' is set, that src block is > executed. And so on. OK - I think I understand this logic. > > A bug? Not actually a bug I would say now, but mailny a user error (I did forget the :...) > > I guess Babel could do a better job of screening header-args and barf if = invalid=20 > args are submitted. This would be really nice. Also, possibly in the message buffer show the header-args when a block is executed would make this kind of error more obv= ious? > I believe that `org-babel-merge-params' is the place where a check > could be introduced, but AFAICS there is none such. There should be at least a warning, if not an error thrown, if an invalid header argument is passed. > > Of course `:exports code' solves this, but I think you knew that. :-) Now I know... Thanks, Rainer > > HTH, > > 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) iQEcBAEBAgAGBQJU1iVmAAoJENvXNx4PUvmC6ZsIAKEfplJQOYJOJNb4ZnxSJVS2 3EdvWldtfCybP18ZBmzgB93/iNZMAYF89RbzPxZqdU/j6HJZtCFrEPA2O6TBPbr7 JWmyyM6YREXTGKvom+ers9CsQ8DUiLjw1fNidZt37PVh4ZU0KTzAgVgQo9ZtaKMk TJMmPa7boVqeinE7uUBfTXxqS2dHfsRCI7jTGdnPfLo/lSsX59uSuJBoKcjav1gT 3ilwMp3pWh4ddabkKrMXh2YT5OmzWvX7ErvLxM+e+8Q1awQUQvLoIk++weWmbBPq wgQBfF2zN/kvTt5S+hvSN/DueA7Wq9ikaa76ojyh7xPEG+EosKggVwnIdgyTwNs= =Et0Y -----END PGP SIGNATURE----- --=-=-=--