Nicolas Goaziou <n.goaz...@gmail.com> writes: > Eric Schulte <schulte.e...@gmail.com> 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. >
Point made :), I concede a huge difference between block types. I'm ultimately happy that the begin_property approach has not moved forward. Best -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/