From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: Re: [BUG] on export resulting in endless evaluation Date: Fri, 6 Feb 2015 17:50:03 +0000 (UTC) Message-ID: References: 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]:35585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJn2t-00050w-Kh for emacs-orgmode@gnu.org; Fri, 06 Feb 2015 12:50:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJn2q-0001uM-6z for emacs-orgmode@gnu.org; Fri, 06 Feb 2015 12:50:23 -0500 Received: from plane.gmane.org ([80.91.229.3]:58500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJn2q-0001u9-19 for emacs-orgmode@gnu.org; Fri, 06 Feb 2015 12:50:20 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YJn2j-0002oi-8T for emacs-orgmode@gnu.org; Fri, 06 Feb 2015 18:50:13 +0100 Received: from 137.110.36.158 ([137.110.36.158]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Feb 2015 18:50:13 +0100 Received: from ccberry by 137.110.36.158 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Feb 2015 18:50:13 +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: > > > Hi > > when exporting the fillowing org file, I get an endless loop of > evaluations. > > This happens with only orgmode and languages enabled > > ,---- > | GNU Emacs 24.4.1 (x86_64-apple-darwin14.0.0, Carbon Version 157 > | Org-mode version 8.3beta (release_8.3beta-798-g528b90 > `---- > > --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--- > Add this to the end of your example and run the src block: --8<---------------cut here---------------start------------->8--- #+BEGIN_SRC emacs-lisp :results pp (org-entry-get (point) "header-args" t) #+END_SRC #+RESULTS: : ":exports both :results output exports code" --8<---------------cut here---------------end--------------->8--- As you see the property API merely adds the `exports code' to the end of the "header-args"value. Babel then ignores the 'exports' 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. A bug? I guess Babel could do a better job of screening header-args and barf if invalid args are submitted. I believe that `org-babel-merge-params' is the place where a check could be introduced, but AFAICS there is none such. Of course `:exports code' solves this, but I think you knew that. :-) HTH, Chuck