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: Mon, 31 Oct 2011 15:30:30 -0600 Message-ID: <87k47kkfwp.fsf@gmail.com> References: <87vcr5c76e.fsf@gmail.com> <87vcr5j5a5.fsf@gmail.com> <8762j4evjl.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKzRH-0008Dq-II for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 17:30:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKzRF-0000YS-15 for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 17:30:39 -0400 Received: from mail-pz0-f47.google.com ([209.85.210.47]:37032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKzRE-0000Xn-Hy for emacs-orgmode@gnu.org; Mon, 31 Oct 2011 17:30:36 -0400 Received: by pzd13 with SMTP id 13so19189739pzd.6 for ; Mon, 31 Oct 2011 14:30:35 -0700 (PDT) In-Reply-To: <8762j4evjl.fsf@gmail.com> (Nicolas Goaziou's message of "Mon, 31 Oct 2011 21:49:18 +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: > Eric Schulte writes: > >> The only problem with a single #+PROPERTY: line is that this line could >> become unreadably long. By allowing such an entry to span multiple >> lines it becomes feasible to chain together many variables into a single >> property. Another approach which is easily implementable would be to >> use syntax like the following... >> >> >> #+PROPERTY: var foo=1, >> #+PROPERTY+: bar=2, >> #+PROPERTY+: baz=3, >> #+PROPERTY+: qux=4 > > Well, what about: > > #+property: :var foo=1 > #+property: :var bar=2 > #+property: :var baz=3 > #+property: :var qux=4 > > Sure, we repeat ":var" more times, but at least, it's consistent with > the rest of Org. > Unfortunately this won't work, the final value of the "var" property will be "qux=4" rather than "foo=1, bar=2, baz=3, qux=4". > >> Although I originally switched from the above to the implemented >> because I thought that using a block would be more consistent with >> Org-mode syntax. > > No, as I said, no block has ever controlled Org internals. That's a job > for keywords and property drawers. > I would say that the block is defining an keyword, but yes, I suppose we've never had a multi-line keyword definition structure. > >> Also, the above is undesirable in its requires the PROPERTY+ lines to >> care about their position in the Org-mode file, which isn't normally >> the case. > > Yes, "#+property+:" would be atypical in that situation. > >> I think of #+FOO: lines as containers for anything that fits on >> a single line, and as blocks as containers for anything that requires >> a line break, e.g., #+HTML and #+BEGIN_HTML/#+END_HTML. > > That comparison with "#+html" and "#+begin_html" doesn't hold as most > "#+keyword:" syntax don't have an equivalent block "#+begin_keyword", Along these lines I would also like to allow TBLFM lines to be broken over multiple lines, as I often find myself right-scrolling in a buffer to find equations in large spreadsheets. I wonder if there would be a general solution to allow *all* #keyword+ lines to have a block equivalent. > > and the other way. Look again at every block type in Org, and see if > there's any equivalent use of the "#+begin_property" you're > introducing. I don't think so. > agreed > > Moreover, some keywords can be repeated on multiple lines. Think about > "#+text:" before first headline, or "#+header:" before a src block. So, > clearly, "#+keyword:" isn't just about things that must fit on a single > line. > I don't know how #+text: works, but with #+header: the order of the blocks is not important, i.e., #+headers: :var a=1 #+headers: :cache a=2 is equal to #+headers: :cache a=2 #+headers: :var a=1 but the same is not true for #+PROPERTY: var foo=1, #+PROPERTY+: bar=2 and #+PROPERTY+: bar=2 #+PROPERTY: var foo=1, > > Also, you don't really need a line break here, since you will eventually > parse the values line by line anyway, and not as a block or a paragraph. > > You want to add syntactic sugar. There's nothing wrong with it though, > but not everyone appreciate aspartame ;) > Yes, if you dig way back into this thread you'll see the motivation, basically there are times when a user will want to specify *many* variables in a single property specification. If there is a more natural syntax I am very open to suggestions. > >> I didn't realize that there was an extra semantics of blocks as >> formatting, and I'm not sure if such an association is desirable or >> intentional. > > It is desirable to have a logic behind syntax, and to always refer to > it. Thus, is is desirable to separate syntax used for contents from > syntax used for Org control. It's very different from "things on > a single line vs things on multiple lines". > Sure, but to play devils (or my own) advocate, I would say that simplicity is important and "blocks for multi-line content" is a simpler rule than "blocks for formatting of multi-line content, and for naming multi-line data", the second being the case with code and example blocks. My goal here is to find the most natural solution which conforms to Org-modes design as well as possible, I just don't know what that would be... Cheers -- Eric > > > Regards, -- Eric Schulte http://cs.unm.edu/~eschulte/