From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: About commit named "Allow multi-line properties to be specified in property blocks" Date: Thu, 03 Nov 2011 21:01:51 +0100 Message-ID: <87aa8dgekw.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> <87obwtgip9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RM3VM-0000iM-1L for emacs-orgmode@gnu.org; Thu, 03 Nov 2011 16:03:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RM3VK-0001lN-TM for emacs-orgmode@gnu.org; Thu, 03 Nov 2011 16:03:15 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:43137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RM3VK-0001lH-KX for emacs-orgmode@gnu.org; Thu, 03 Nov 2011 16:03:14 -0400 Received: by wwe3 with SMTP id 3so1896417wwe.30 for ; Thu, 03 Nov 2011 13:03:13 -0700 (PDT) In-Reply-To: <87obwtgip9.fsf@gmail.com> (Eric Schulte's message of "Thu, 03 Nov 2011 12:32:50 -0600") 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: Eric Schulte Cc: Bastien , Org Mode List , mail@christianmoe.com Eric Schulte writes: >>> 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. Well, certainly, from a "Press TAB on #+begin_ line", they have exactly the same meaning, and could as well be labelled #+begin_SOMETHING. But, - If I consider fontification, "Src blocks" differ from "Example blocks", which differ from everything else. - If I consider `org-edit-special', C-c ' will bring you to a buffer with a special mode in "Src blocks", fundamental mode in "Example blocks" and "Verse blocks". - If I consider lists, you can have them in "Quote blocks", but not in "Export blocks" or "Verse blocks", for example. - If I consider indentation, it will be ignored for "Example blocks" (and should do the same for "Verse blocks"), could do something entirely different on "Src blocks", and will indent normally, i.e. "Quote blocks". - If I consider recursion, you can have "Quote blocks" inside "Center blocks", but not inside "Export blocks". - If I consider options on the "begin_" line, "Example blocks" accept them, but not "Center blocks". - If I consider entities, you can have them in "Verse blocks" but not in "Example blocks" - If I consider export, obviously, they will all be treated very differently. And I'm pretty sure I'm forgetting some other case. So, yes, from the moon, they're pretty much indistinguishable ;) From an Org point of view, they have 8 different meanings and, as such, need to be parsed differently. At least, I've had to proceed that way when I wrote an Org parser. Regards, -- Nicolas Goaziou