emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* One inconsistency with org-element parsers
@ 2020-04-16  3:09 akater
  2020-04-16  8:00 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: akater @ 2020-04-16  3:09 UTC (permalink / raw)
  To: emacs-orgmode

I want to make it easier for users to define custom non-inline blocks
(and operations on them). So I studied parsers in =org-element.el= and
stumbled upon the following seeming inconsistency:

Plists for =comment-block=, =example-block=, =export-block=, =src-block=
all have neither ~:contents-begin~ nor ~:contents-end~ in them, while
plists for =center-block=, =quote-block=, =verse-block= have both.

Parameters ~contents-begin~ and ~contents-end~ are defined almost
everywhere (the only exception is, =src-block= parser never defines
~contents-begin~) but are not returned in plists by four parsers
mentioned.

Should something be done about this? I'm removing some boilerplate from
the parsers and could reuse existing parameters to put them into plists
but I don't understand the semantics yet so won't necessarily be able to
add ~:contents-begin~ to src-blocks. Maybe they are simply unnecessary
in these plists?


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: One inconsistency with org-element parsers
  2020-04-16  3:09 One inconsistency with org-element parsers akater
@ 2020-04-16  8:00 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2020-04-16  8:00 UTC (permalink / raw)
  To: akater; +Cc: emacs-orgmode

Hello,

akater <nuclearspace@gmail.com> writes:

> I want to make it easier for users to define custom non-inline blocks
> (and operations on them). So I studied parsers in =org-element.el= and
> stumbled upon the following seeming inconsistency:
>
> Plists for =comment-block=, =example-block=, =export-block=, =src-block=
> all have neither ~:contents-begin~ nor ~:contents-end~ in them, while
> plists for =center-block=, =quote-block=, =verse-block= have both.

:contents-begin and :contents-end means there is something to parse
in-between. It doesn't make sense for the block types in the first
category, where the contents are not meant to be Org syntax.

Regards,

-- 
Nicolas Goaziou


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-16  8:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-16  3:09 One inconsistency with org-element parsers akater
2020-04-16  8:00 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).