From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: About commit named "Allow multi-line properties to be specified in property blocks" Date: Tue, 01 Nov 2011 08:36:16 -0600 Message-ID: <87pqhbj4f3.fsf@gmail.com> References: <87vcr5c76e.fsf@gmail.com> <87vcr5j5a5.fsf@gmail.com> <8762j4evjl.fsf@gmail.com> <87k47kkfwp.fsf@gmail.com> <87y5w0ckt7.fsf@gmail.com> <87ty6ock7z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLFRw-00077e-I5 for emacs-orgmode@gnu.org; Tue, 01 Nov 2011 10:36:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLFRs-0006vz-2d for emacs-orgmode@gnu.org; Tue, 01 Nov 2011 10:36:24 -0400 Received: from mail-yw0-f41.google.com ([209.85.213.41]:35079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLFRr-0006vm-Ur for emacs-orgmode@gnu.org; Tue, 01 Nov 2011 10:36:20 -0400 Received: by ywa17 with SMTP id 17so8275571ywa.0 for ; Tue, 01 Nov 2011 07:36:19 -0700 (PDT) In-Reply-To: <87ty6ock7z.fsf@gmail.com> (Nicolas Goaziou's message of "Tue, 01 Nov 2011 09:36:48 +0100") 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: Nicolas Goaziou Cc: Org Mode List Nicolas Goaziou writes: > Correcting myself, > >> Typically, what is required here is to add "#+property:" to the >> cumulative family. Thus, >> >> #+property: var foo=1 >> #+property: var bar=2 >> >> is exactly the same as #+property: var foo=1 var bar=2. >> >> Also, make sure var assignations accumulate too. > > I don't think "#+property:" should belong to a cumulative family of > keywords. But Babel "var" keyword definitely should. Thus, the idea > stays the same: on multiple "var" calls, accumulate values instead of > replacing them (unless, obviously, the variables has already been > assigned a value before). This was one of the proposed options to solve this problem, namely introduce a list of properties whose value accumulates rather than is replaced. Since the property list data structure only allows each key to appear once, the accumulation would necessarily occur on the value side, so assuming "var" is an accumulating property, then #+property: var foo=1 #+property: var bar=2 would result in `org-file-properties' having the following value (("var" . "foo=1 bar=1")) Which with some changes in the code-block side code could be used by code blocks to assign multiple variables. I went with changing property syntax rather than internal behavior because I am not overly familiar with properties or the code with which they were implemented and I felt (probably incorrectly) that this would be a less dramatic change to Org-mode. I'm happy to work up a solution along the lines suggested above, which would introduce a variable like `org-accumulating-properties' or some-such which would default to only holding the "var" property name Best -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/