From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: [BUG] :header-args+: Date: Wed, 06 Aug 2014 10:34:20 +0200 Message-ID: <877g2m819v.fsf@gmail.com> References: <87ha2ut5pa.fsf@gmail.com> <87silaqkg6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEwgI-0006Rt-HE for emacs-orgmode@gnu.org; Wed, 06 Aug 2014 04:34:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEwgB-0006QU-1R for emacs-orgmode@gnu.org; Wed, 06 Aug 2014 04:34:46 -0400 Received: from plane.gmane.org ([80.91.229.3]:40225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEwgA-0006Q0-Qi for emacs-orgmode@gnu.org; Wed, 06 Aug 2014 04:34:38 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XEwg5-000831-OC for emacs-orgmode@gnu.org; Wed, 06 Aug 2014 10:34:33 +0200 Received: from g231111166.adsl.alicedsl.de ([92.231.111.166]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Aug 2014 10:34:33 +0200 Received: from tjolitz by g231111166.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Aug 2014 10:34:33 +0200 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 Aaron Ecay writes: Hi Aaron, > 2014ko uztailak 6an, Thorsten Jolitz-ek idatzi zuen: >> >> Hi List, >> >> doing C-c C-c on the first src_block >> >> ,---- >> | * A >> | ** B >> | :PROPERTIES: >> | :header-args: :var name=dblock-name >> | :header-args+: :var prms=dblock-params >> | :END: >> | >> | #+begin_src emacs-lisp >> | (format "\n#+begin: %s %s\n#+end:\n" name prms) >> | #+end_src >> | >> | #+name: dblock-params >> | #+begin_src emacs-lisp >> | foo >> | #+end_src >> | >> | #+name: dblock-name >> | #+begin_src emacs-lisp >> | bar >> | #+end_src >> `---- >> > > You have an infinite regress. In order to compute the result of the > dblock-name block, we need to resolve each of its :vars, which includes > dblock-name, so we try to resolve the same block again... > > Converting the second and third src blocks to example blocks (leaving in > place the #+names) gives what you seem to be aiming for. Yes, that works (see below), thank you. I already solved my problem in plain Emacs Lisp, and example-blocks cannot really replace src-blocks, but its good to know for the future that it (somehow) can be done. * A ** B :PROPERTIES: :header-args: :var name=dblock-name :header-args+: :var prms=dblock-params :END: #+begin_src emacs-lisp (format "\n#+begin: %s %s\n#+end:\n" name prms) #+end_src #+results: : : #+begin: bar : foo : : #+end: #+name: dblock-params #+begin_example foo #+end_example #+name: dblock-name #+begin_example bar #+end_example -- cheers, Thorsten