From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [BUG] :header-args+:
Date: Wed, 06 Aug 2014 10:34:20 +0200 [thread overview]
Message-ID: <877g2m819v.fsf@gmail.com> (raw)
In-Reply-To: 87silaqkg6.fsf@gmail.com
Aaron Ecay <aaronecay@gmail.com> 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
prev parent reply other threads:[~2014-08-06 8:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-06 23:42 [BUG] :header-args+: Thorsten Jolitz
2014-08-06 5:02 ` Aaron Ecay
2014-08-06 8:34 ` Thorsten Jolitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877g2m819v.fsf@gmail.com \
--to=tjolitz@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.