emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] About commit named "Allow multi-line properties to be specified


From: Nick Dokos
Subject: Re: [O] About commit named "Allow multi-line properties to be specified in property blocks"
Date: Thu, 03 Nov 2011 11:10:00 -0400

Christian Moe <address@hidden> wrote:

> On 11/3/11 2:26 AM, Bastien wrote:
> > Hi Nicolas,
> >
> > Nicolas Goaziou<address@hidden>  writes:
> (...)
> >> There is also "#+bind:", whose purpose is close enough.
> >
> > Indeed.  Eric, would it be possible to use
> >
> > #+bind foo 1
> >
> > instead of
> >
> > #+property var foo=1
> 
> Correct me if I'm wrong, but the purpose of #+BIND is to specify a 
> file local variable, isn't it? The manual gives one example of how to 
> modify export settings with it.
> 

It's actually more restricted than that: during preprocessing, the function
org-install-letbind adds the bindings as file-locals *during export*.

> With Babel blocks, there should be clarity what variables are to be 
> passed to the block as arguments, and what variables should not. 
> Currently this is completely clear: Only variables named in a `var' 
> property or header argument are passed.
> 
> Using =#+bind foo 1= would be ambiguous; you wouldn't know when it's 
> for Babel and when it's not. Say we make Babel use BIND values, and 
> someone has this setup:
> 
> #+BIND: org-export-latex-low-levels itemize
> #+BIND: foo 1
> #+BIND: bar 2
> 
> Then this:
> 
> #+BEGIN_SRC emacs-lisp
> (+ foo bar)
> #+END_SRC
> 
> would tangle to something like:
> 
> (let ((org-export-latex-low-levels (guote itemize))
>        (foo (quote 1))
>        (bar (quote 2)))
> (+ foo bar))
> 
> -- which was not the intention.
> 

I agree - the bind namespace and the code block variable name space
should be separate. BIND was iirc Carsten's throwing up his hands
when people were asking for more and more options to be settable
from within the file: he built a general (if not particularly
convenient) mechanism to allow people to do just that.

Nick

> Yours,
> Christian
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]