* :header-args: over several lines?
@ 2014-06-25 21:05 Rainer M Krug
2014-06-26 0:01 ` Aaron Ecay
0 siblings, 1 reply; 5+ messages in thread
From: Rainer M Krug @ 2014-06-25 21:05 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 714 bytes --]
Hi
I want to add many variables to a subtree. But it seems
that :header-args: only allows one line - is this true? In my case, this
line would be exceedingly long and very difficult to debug.
Is there a way of having :header-args: span several lines (like var+)?
Thanks,
Rainer
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer@krugs.de
Skype: RMkrug
PGP: 0x0F52F982
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: :header-args: over several lines?
2014-06-25 21:05 :header-args: over several lines? Rainer M Krug
@ 2014-06-26 0:01 ` Aaron Ecay
2014-06-26 12:34 ` Rainer M Krug
0 siblings, 1 reply; 5+ messages in thread
From: Aaron Ecay @ 2014-06-26 0:01 UTC (permalink / raw)
To: Rainer M Krug, emacs-orgmode
2014ko ekainak 25an, Rainer M Krug-ek idatzi zuen:
>
> Hi
>
> I want to add many variables to a subtree. But it seems
> that :header-args: only allows one line - is this true? In my case, this
> line would be exceedingly long and very difficult to debug.
>
> Is there a way of having :header-args: span several lines (like var+)?
Exactly that should work, i.e. using header-args+:
,----
| * foo
| :PROPERTIES:
| :header-args+: :exports none
| :header-args+: :results value
| :END:
|
| #+begin_src elisp
| (org-entry-get nil "header-args")
| #+end_src
|
| #+RESULTS:
| : :exports none :results value
`----
--
Aaron Ecay
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: :header-args: over several lines?
2014-06-26 0:01 ` Aaron Ecay
@ 2014-06-26 12:34 ` Rainer M Krug
2014-07-07 0:01 ` Thorsten Jolitz
2014-07-27 23:05 ` Bastien
0 siblings, 2 replies; 5+ messages in thread
From: Rainer M Krug @ 2014-06-26 12:34 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1485 bytes --]
Aaron Ecay <aaronecay@gmail.com> writes:
> 2014ko ekainak 25an, Rainer M Krug-ek idatzi zuen:
>>
>> Hi
>>
>> I want to add many variables to a subtree. But it seems
>> that :header-args: only allows one line - is this true? In my case, this
>> line would be exceedingly long and very difficult to debug.
>>
>> Is there a way of having :header-args: span several lines (like var+)?
>
> Exactly that should work, i.e. using header-args+:
And it does - should be added to the manual in the example.
Along the same lines:
When I use
,----
| :header-args: :var RNGKIND="Mersenne-Twister"
| :header-args+: :var RNGNORMALKIND="Inversion"
`----
both variables are transferred - is var+ generally redundant, or i=only
in this case?
Thanks,
Rainer
>
> ,----
> | * foo
> | :PROPERTIES:
> | :header-args+: :exports none
> | :header-args+: :results value
> | :END:
> |
> | #+begin_src elisp
> | (org-entry-get nil "header-args")
> | #+end_src
> |
> | #+RESULTS:
> | : :exports none :results value
> `----
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer@krugs.de
Skype: RMkrug
PGP: 0x0F52F982
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: :header-args: over several lines?
2014-06-26 12:34 ` Rainer M Krug
@ 2014-07-07 0:01 ` Thorsten Jolitz
2014-07-27 23:05 ` Bastien
1 sibling, 0 replies; 5+ messages in thread
From: Thorsten Jolitz @ 2014-07-07 0:01 UTC (permalink / raw)
To: emacs-orgmode
Rainer M Krug <Rainer@krugs.de> writes:
> Along the same lines:
>
> When I use
>
> ,----
> | :header-args: :var RNGKIND="Mersenne-Twister"
> | :header-args+: :var RNGNORMALKIND="Inversion"
> `----
>
> both variables are transferred - is var+ generally redundant, or i=only
> in this case?
When I start using :var+ or :header-args+, it mostly does not work for me.
What is the syntax for this? Why and how is this used?
* Test
** Works 1
:PROPERTIES:
:header-args: :var x=3
:header-args+: :var y=4
:END:
#+begin_src emacs-lisp
(+ x y)
#+end_src
#+results:
: 7
(but does not work when variables reference other src_blocks, see my
bug report about :header-args:)
** Works 2
#+begin_src emacs-lisp :var u=2 v=3
(+ u v)
#+end_src
#+results:
: 5
** Works 3
#+header: :var u=2
#+header: :var v=3
#+begin_src emacs-lisp
(+ u v)
#+end_src
#+results:
: 5
#+headers: :var u=2
#+headers: :var v=3
#+begin_src emacs-lisp
(+ u v)
#+end_src
#+results:
: 5
** Does not work
#+header-args: :var u=2
#+header-args+: :var v=3
#+begin_src emacs-lisp
(+ u v)
#+end_src
=> progn: Symbol's value as variable is void: u
#+header-args: :var u=2
#+header-args+: :var+ v=3
#+begin_src emacs-lisp
(+ u v)
#+end_src
=> progn: Symbol's value as variable is void: u
#+var: u=2
#+var+: v=3
#+begin_src emacs-lisp
(+ u v)
#+end_src
=> progn: Symbol's value as variable is void: u
#+var: u=2 v=3
#+begin_src emacs-lisp
(+ u v)
#+end_src
=> progn: Symbol's value as variable is void: u
#+begin_src emacs-lisp :var u=2 :var+ v=3
(+ u v)
#+end_src
=> progn: Symbol's value as variable is void: v
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: :header-args: over several lines?
2014-06-26 12:34 ` Rainer M Krug
2014-07-07 0:01 ` Thorsten Jolitz
@ 2014-07-27 23:05 ` Bastien
1 sibling, 0 replies; 5+ messages in thread
From: Bastien @ 2014-07-27 23:05 UTC (permalink / raw)
To: Rainer M Krug; +Cc: emacs-orgmode
Hi Rainer,
Rainer M Krug <Rainer@krugs.de> writes:
>> Exactly that should work, i.e. using header-args+:
>
> And it does - should be added to the manual in the example.
Can you provide a patch for this?
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-28 17:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-25 21:05 :header-args: over several lines? Rainer M Krug
2014-06-26 0:01 ` Aaron Ecay
2014-06-26 12:34 ` Rainer M Krug
2014-07-07 0:01 ` Thorsten Jolitz
2014-07-27 23:05 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).