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: Thu, 03 Nov 2011 12:32:50 -0600 Message-ID: <87obwtgip9.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RM27I-0005QS-3C for emacs-orgmode@gnu.org; Thu, 03 Nov 2011 14:34:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RM27E-0002as-QA for emacs-orgmode@gnu.org; Thu, 03 Nov 2011 14:34:20 -0400 Received: from mail-gx0-f169.google.com ([209.85.161.169]:65220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RM27E-0002ae-Gf for emacs-orgmode@gnu.org; Thu, 03 Nov 2011 14:34:16 -0400 Received: by ggnh4 with SMTP id h4so1877142ggn.0 for ; Thu, 03 Nov 2011 11:34:15 -0700 (PDT) In-Reply-To: <87hb2mdmi9.fsf@gnu.org> (Bastien's message of "Thu, 03 Nov 2011 02:26:38 +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: Bastien Cc: Org Mode List , Nicolas Goaziou , mail@christianmoe.com I don't understand why the `org-accumulated-properties-alist' solution seems like a hack, could someone elaborate. To me that still feels like the most natural solution. more below... >>> 2) "Cumulative properties"? >>> >>> Here is a suggestion: use a syntaxe like >>> >>> #+var: foo 1 >> >> There is also "#+bind:", whose purpose is close enough. > > Indeed. Eric, would it be possible to use > > #+bind foo 1 > > instead of > > #+property var foo=1 > No, this would not for subtree-level properties, i.e., in a property block under a subtree there would be no way to tell if a property is a #+var:. I think if this were an approach, a more elegant solution would be for users to customize the `org-babel-default-header-args' variable using Emacs' file-local-variable feature -- which is possible now and may end up being the best solution. > >>> 3) Wrapping/folding long #+xxx lines? >>> >>> This is an independant request -- see Robert McIntyre's recent >>> question on the list. The problem is that fill-paragraph on >>> long #+xxx lines breaks the line into comment lines, which is >>> wrong. Filling like this: >>> >>> #+TBLFM: @3$1=@1$1+@2$1::@3$2=@1$2+@2$2::...::... >>> : @3$2=@1$2+@2$2::... >>> : @3$2=@1$2+@2$2::... >> >> #+tblfm: ... >> #+tblfm: ... >> #+tblfm: ... > > Not very elegant, but perhaps more efficient/consistent. > I like this solution, especially as I have often struggled with long and unreadable tblfm lines. The problem with using this for property lines would be in the case of #+property: foo bar #+property: baz qux whether the above should be parsed as '(("foo" . "bar") ("baz" . "qux")) or '(("foo" . "bar baz qux")) >>> But maybe generalizing the #+begin_xxx syntax for *all* #+xxx >>> keywords. This would make the current >>> org-internals-oriented/content-oriented difference between #+xxx >>> and #+begin_xxx obsolete >> >> I suggest to avoid such a thing. Here are a few, more or less valid, >> reasons: >> >> - That distinction is useful for the user (clear separation between >> contents and Org control). >> - It would penalize usage of special blocks. >> - The need is localized to very few keywords: it isn't worth the added >> complexity. >> - It would be ugly: no more nice stacking of keywords, but a mix of >> blocks and keywords, and blocks on top of blocks... Org syntax may >> not be the prettiest ever, it doesn't deserve that. >> - It would be a real pain to parse. > > Well, I agree with most of the reasons. Glad you stated them clearly. > Yes, I agree some of the above are very motivating. > >>> but this would spare us the cost of new syntax. >> >> On the contrary, creating a block for each keyword would mean a lot of >> new syntax. >> >> We currently have 8 types of blocks (not counting dynamic blocks, whose >> syntax is a bit different), all requiring to be parsed differently: >> >> 1. Center blocks, >> 2. Comment blocks, >> 3. Example blocks, >> 4. Export blocks, >> 5. Quote blocks, >> 6. Special blocks, >> 7. Src blocks, >> 8. Verse blocks. > > I'm not sure what do you mean by "requiring to be parsed differently". > Can you explain it? I understand they should be treated differently by > the exporters, but I don't understand why they would need to be parsed > differently. > I also wouldn't think of this as new syntax, I don't see 8 rules for the 8 types above but rather one rule along the lines of #+begin_SOMETHING where the SOMETHING can be anything. Best -- Eric > > My idea was to avoid parsing both #+html and #+begin_html. And that > #+begin_xxx syntax is already available for folding, which is a feature > we might want for #+text and keywords like that. > > I would suggest this rule: #+begin_ is always for _content_ > while #+keyword is always for internals that are removed when > exporting. #+text, #+html, #+LaTeX are a few exception I can > think of. > > Best, -- Eric Schulte http://cs.unm.edu/~eschulte/