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: Sebastien Vauban
Subject: Re: [O] About commit named "Allow multi-line properties to be specified in property blocks"
Date: Wed, 09 Nov 2011 23:31:12 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (windows-nt)

Hi Eric,

Eric Schulte wrote:
> Rainer M Krug <address@hidden> writes:
>
>> On Tue, Nov 8, 2011 at 11:53 PM, Eric Schulte <address@hidden>wrote:
>>
>>> > Perhaps inserting an assumed space separator would be more intuitive?
>>> > If we were to go that way it may be possible to allow variable
>>> > specifications such as
>>> >
>>> > #+PROPERTY: var foo=1 bar=2
>>> >
>>> > in which case properties could be easily specified on multiple lines
>>> > using a default space separator.
>>> >
>>> > If this seems like a good way to go I can try to update my previous
>>> > patch.
>>>
>>> I've updated the patch, the newest version is attached.  It results in
>>> the following behavior.
>>
>> Looks good to me - that leaves just the question, what would hppen when
>> doing the following:
>>
>> #+property: var  foo=1
>> #+property: var+ 2
>
> The above is equivalent to,
>
> #+header: :var foo=1 2
>
> which due to interaction with some logic put in place to allow the
> specification of un-named variables in call lines results in the
> following.
>
> #+property: var  foo=1
> #+property: var+ 2
> #+begin_src emacs-lisp
>   foo
> #+end_src
>
> #+results:
> : 2
>
> #+begin_src emacs-lisp :var bar=1 2
>   bar  
> #+end_src
>
> #+results:
> : 2
>
> Although generally I would say that both
>
> #+header: :var foo=1 2
>
> and 
>
> #+property: var  foo=1
> #+property: var+ 2
>
> are mal-formed variable assignments.

I was amazed, yesterday, when you told about `foo' becoming `12' (with `1' on
the assignment line and `2' on the continuation), but I'm glad you consider
this as rather ill-formed.

>> and
>>
>> #+property: var  foo="Hello "
>> #+property: var+ "world"
>
> This is exactly analogous to
>
> #+header: :var foo="hello" "world"
>
> which raises the expected error
>   ``variable ""world"" must be assigned a default value''
>
> the following alternative however works as expected
>
> #+property: var  foo="Hello
> #+property: var+ world"
> #+begin_src emacs-lisp
>   foo
> #+end_src
>
> #+results:
> : Hello world

That said, all of these seem excellent trade-off between the different
alternatives that have been discussed and analyzed, and they respect important
aspects: simplicity (intuitive on reading) and powerfulness.

Just perfect!

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

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