From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: About commit named "Allow multi-line properties to be specified in property blocks" Date: Tue, 8 Nov 2011 10:41:30 +0100 Message-ID: References: <87vcr5c76e.fsf@gmail.com> <87vcr5j5a5.fsf@gmail.com> <4EAF118C.8050806@christianmoe.com> <87hb2mo7ek.fsf@altern.org> <87obwuh19t.fsf@gmail.com> <87hb2mdmi9.fsf@gnu.org> <87obwtgip9.fsf@gmail.com> <87sjm5ez0f.fsf@gmail.com> <4eb42564.059dec0a.5ffc.7ff5@mx.google.com> <877h3felm2.fsf@gmail.com> <87ty6ffuu6.fsf@gmail.com> <80d3d3neof.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001485ee82eeea5eaf04b135f9dc Return-path: Received: from eggs.gnu.org ([140.186.70.92]:46527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNiBR-0001aY-8x for emacs-orgmode@gnu.org; Tue, 08 Nov 2011 04:41:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNiBP-0006yH-RY for emacs-orgmode@gnu.org; Tue, 08 Nov 2011 04:41:33 -0500 Received: from mail-qy0-f169.google.com ([209.85.216.169]:54319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNiBP-0006y7-Lt for emacs-orgmode@gnu.org; Tue, 08 Nov 2011 04:41:31 -0500 Received: by qyk31 with SMTP id 31so3810741qyk.0 for ; Tue, 08 Nov 2011 01:41:31 -0800 (PST) In-Reply-To: <80d3d3neof.fsf@somewhere.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastien Vauban Cc: emacs-orgmode@gnu.org --001485ee82eeea5eaf04b135f9dc Content-Type: text/plain; charset=ISO-8859-1 On Tue, Nov 8, 2011 at 10:31 AM, Sebastien Vauban < wxhgmqzgwmuf@spammotel.com> wrote: > Hi Eric, > > (Due to a high "buzyness" level, I've been a bit out of the discussion for > one > week or so) > > Eric Schulte wrote: > > The attached patch implements this latest "propname+" suggestion. When > > applied it results in the behavior shown below. > > > > I'm inclined to go with this as a solution moving forward. > > > > Thoughts? > > > > #+property: var foo=1 > > #+property: var+ , bar=2 > > #+begin_src emacs-lisp > > (+ foo bar) > > #+end_src > > So, in a way, adding the + after `var' is how you tell Org that this is an > accumulated property? > > Two questions: > > 1. Why not the + after the property keyword (property+)? I guess because > it's > more against other aspects of Org internals? Anyway, putting + after the > var sounds as right to me -- maybe better even if we consider that you > declare var as accumulated, writing so. > > 2. Must there be a first `var' without `+'? Accepted, tolerated or wrong? > I > mean, I'm sure that, due to heavy file editing, we'll sometimes have: > Might be a good idea to tolerate this. > > #+property: var+ foo=1 > #+property: var+ , bar=2 > #+begin_src emacs-lisp > (+ foo bar) > #+end_src > > > #+results: > > : 3 > > > > #+begin_src emacs-lisp > > (org-entry-get (point) "var" t) > > #+end_src > > > > #+results: > > : foo=1, bar=2 > > > > * overwriting a file-wide property > > :PROPERTIES: > > :var: foo=7 > > :END: > > > > #+begin_src emacs-lisp > > foo > > #+end_src > > > > #+results: > > : 7 > > > > #+begin_src emacs-lisp > > (org-entry-get (point) "var" t) > > #+end_src > > > > #+results: > > : foo=7 > > > > * appending to a file-wide property > > :PROPERTIES: > > :var+: , baz=3 > > :END: > > To be honest, the only thing that I dislike is the comma in the above line. > Not intuitive at all. Quite hard to read. > > Can't the comma be implicitly added by the `+' after the property name? > On the one hand, it might have one additional advantage: #+property: var foo="This is a very long text" #+property: var+ "with even more." Would foo be: "This is a very long text with even more" Could one make the "," implicit, if the value follows the x=y style, while otherwise just concatenate the value to the one before? > That would allow one to simply write: > > * appending to a file-wide property > :PROPERTIES: > :var+: baz=3 > :END: > > and have the correct values. > > > #+begin_src emacs-lisp > > (+ foo bar baz) > > #+end_src > > > > #+results: > > : 6 > > > > #+begin_src emacs-lisp > > (org-entry-get (point) "var" t) > > #+end_src > > > > #+results: > > : foo=1, bar=2, baz=3 > > Thanks. > > Best regards, > Seb > > -- > Sebastien Vauban > > > -- 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 (F): +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug --001485ee82eeea5eaf04b135f9dc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Tue, Nov 8, 2011 at 10:31 AM, Sebasti= en Vauban <wxhgmqzgwmuf@spammotel.com> wrote:
Hi Eric,

(Due to a high "buzyness" level, I've been a bit out of the d= iscussion for one
week or so)

Eric Schulte wrote:
> The attached patch implements this latest "propname+" sugges= tion. =A0When
> applied it results in the behavior shown below.
>
> I'm inclined to go with this as a solution moving forward.
>
> Thoughts?
>
> #+property: var =A0 =A0foo=3D1
> #+property: var+ , bar=3D2
> #+begin_src emacs-lisp
> =A0 (+ foo bar)
> #+end_src

So, in a way, adding the + after `var' is how you tell Org that this is= an
accumulated property?

Two questions:

1. Why not the + after the property keyword (property+)? I guess because it= 's
=A0 more against other aspects of Org internals? =A0Anyway, putting + afte= r the
=A0 var sounds as right to me -- maybe better even if we consider that you=
=A0 declare var as accumulated, writing so.

2. Must there be a first `var' without `+'? =A0Accepted, tolerated = or wrong? =A0I
=A0 mean, I'm sure that, due to heavy file editing, we'll sometime= s have:

Might be a good idea to tolerate this.
= =A0

=A0 #+property: var+ =A0 foo=3D1
=A0 #+property: var+ , bar=3D2
=A0 #+begin_src emacs-lisp
=A0 =A0 (+ foo bar)
=A0 #+end_src

> #+results:
> : 3
>
> #+begin_src emacs-lisp
> =A0 (org-entry-get (point) "var" t)
> #+end_src
>
> #+results:
> : foo=3D1, bar=3D2
>
> * overwriting a file-wide property
> =A0 :PROPERTIES:
> =A0 :var: =A0 =A0 =A0foo=3D7
> =A0 :END:
>
> #+begin_src emacs-lisp
> =A0 foo
> #+end_src
>
> #+results:
> : 7
>
> #+begin_src emacs-lisp
> =A0 (org-entry-get (point) "var" t)
> #+end_src
>
> #+results:
> : foo=3D7
>
> * appending to a file-wide property
> =A0 :PROPERTIES:
> =A0 :var+: =A0 =A0 =A0, baz=3D3
> =A0 :END:

To be honest, the only thing that I dislike is the comma in the above line.=
Not intuitive at all. Quite hard to read.

Can't the comma be implicitly added by the `+' after the property n= ame?

On the one hand, it might have one additional= advantage:

=A0 #+property: var =A0 foo=3D"This is a very long = text"
=A0 #+property: var+ "with even more."

Would foo be:=A0
"This is a very long text with even more"

Could one make the "," implicit, if the value follows the
=
x=3Dy

style, while otherwise just concatenate the value to the o= ne before?




That would allow one to simply write:

=A0 * appending to a file-wide property
=A0 =A0 :PROPERTIES:
=A0 =A0 :var+: =A0 =A0 =A0 =A0baz=3D3
=A0 =A0 :END:

and have the correct values.

> #+begin_src emacs-lisp
> =A0 (+ foo bar baz)
> #+end_src
>
> #+results:
> : 6
>
> #+begin_src emacs-lisp
> =A0 (org-entry-get (point) "var" t)
> #+end_src
>
> #+results:
> : foo=3D1, bar=3D2, baz=3D3

Thanks.

Best regards,
=A0Seb

--
Sebastien Vauban





--
Rainer M.= Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Di= pl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel : =A0 =A0 =A0 +33 - (0)9= 53 10 27 44
Cell: =A0 =A0 =A0 +33 - (0)6 85 62 59 98
Fax (F): =A0 = =A0 =A0 +33 - (0)9 58 10 27 44

Fax (D): =A0 =A0+49 - (0)3 21 21 25 2= 2 44

email: =A0 =A0 =A0Rainer@krugs.de

Skype: =A0 =A0 =A0RMkrug

--001485ee82eeea5eaf04b135f9dc--