Nicolas Goaziou <n.goaz...@gmail.com> writes: > Thorsten Jolitz <tjol...@gmail.com> writes: > >> comparing this >> >> ,---------------------------------------------------------------------------- >> | (defconst org-element-all-elements >> | '(babel-call center-block clock comment comment-block diary-sexp drawer >> | dynamic-block example-block export-block fixed-width >> | footnote-definition headline horizontal-rule inlinetask item >> | keyword latex-environment node-property paragraph plain-list >> | planning property-drawer quote-block quote-section section >> | special-block src-block table table-row verse-block) >> | "Complete list of element types.") >> `---------------------------------------------------------------------------- >> >> >> to this >> >> ,------------------------------------------------------------------ >> | (defconst org-element-secondary-value-alist >> | '((headline . :title) >> | (inlinetask . :title) >> | (item . :tag) >> | (footnote-reference . :inline-definition)) >> | "Alist between element types and location of secondary value.") >> `------------------------------------------------------------------ >> >> reveals that 'footnote-reference' is missing in the first list. > > A `footnote-reference' is an object type (see > `org-element-all-objects'), not an element: as such it doesn't belong to > `org-element-all-elements'. > > `org-element-secondary-value-alist' is a list of elements and objects > containing a secondary string.
Ok, I see, thanks. What about ,---------------- | latex-or-entity | plain-link | text-markup `---------------- in ,--------------------------------------------------------------------------------- | (defconst org-element-all-successors | '(export-snippet footnote-reference inline-babel-call inline-src-block | latex-or-entity line-break link macro plain-link radio-target | statistics-cookie sub/superscript table-cell target | text-markup timestamp) | "Complete list of successors.") `--------------------------------------------------------------------------------- ? They seem to be neither elements nor objects - are they a kind of 'abstract categories' for some object types? And I must admit that I'm not sure about the exact meaning of 'successors'. You describe elements and objects in detail in the comment-section of org-element.el, but don't mention 'successors'. ,--------------------------------------------------------------------- | (defconst org-element-object-successor-alist | '((subscript . sub/superscript) (superscript . sub/superscript) | (bold . text-markup) (code . text-markup) (italic . text-markup) | (strike-through . text-markup) (underline . text-markup) | (verbatim . text-markup) (entity . latex-or-entity) | (latex-fragment . latex-or-entity)) | "Alist of translations between object type and successor name. | Sharing the same successor comes handy when, for example, the | regexp matching one object can also match the other object.") `--------------------------------------------------------------------- The relation between object/successor is like concrete subclass(es)/abstract superclass? PS I hope I don't go on your nerves with my questions, but I'm trying to understand how you modeled an Org-file and its not all clear to me. -- cheers, Thorsten