emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lin


From: Sebastien Vauban
Subject: Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines
Date: Mon, 24 Oct 2011 14:11:44 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (windows-nt)

Hi all,

Christian Moe wrote:
>> This all sounds very interesting, but I have problems understanding
>> the advantages - possibly because I only had one coffee this morning.
>
> I think some of the advantages should be clear.
>
> A second advantage:
> -------------------
>
> It would allow a great deal of flexibility in passing variables 
> according to position in the outline hierarchy.
>
> #+BEGIN_EXAMPLE
>    * Some default settings
>      :PROPERTIES:
>      :x: 1
>      :y: 2
>      :z: -3
>      :var: x, y, z
>      :END:
>
>    ** For all cases where y=5
>       :PROPERTIES:
>       :y: 5
>       :END:
>
>    *** A case where x=1, y=5, z=-3
>
>    #+begin_src R
>      (...)
>    #+end_src
>
>    *** A case where x=1, y=5, z=8: no need to specify y again
>
>    #+begin_src R :var z=8
>      (...)
>    #+end_src
>
>    (z could alternatively have been specified as a property, same as y 
> above)
> #+END_EXAMPLE
>
> This modular re-use of values from higher up in the outline, on any 
> number of levels, should more than compensate for the loss of 
> buffer-wide assignments with the #+BABEL header.
>
> With a single :var: property for passing arguments, on the other hand, 
> this is not possible. You have to re-assign values to all three 
> variables on each level. (Note: Eric's idea for accumulative 
> properties, on the other hand, /would/ allow you to do this with a 
> single :var: property.)

I think discussing all of this is beneficial and can lead to very interesting
solutions.

But I just have a comment on your second advantage, something that can render
your example inefficient: inheritance is not on by default, and you need to
enable if for *specific properties*.

Make it on by default would be a very bad idea -- just think at examples of
the mails sent through Org-mime: what about setting a Cc or To somewhere and
inheriting that in all the file/subtree/etc. May be scary or inefficient
performance-wise?

Anyway, setting inheritance of properties to on, means you should declare the
behavior for vars x, y and z, ie declaring it 3 times... Except, maybe, if you
say that "var: x, y, z" does that too (then you've two things in one shot --
why not?).

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

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