From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: missing element in org-element.el Date: Fri, 19 Apr 2013 17:35:54 +0200 Message-ID: <87sj2mcz39.fsf@gmail.com> References: <87wqryd24s.fsf@gmail.com> <8761zipowf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTDMD-00028N-Er for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 11:36:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UTDM8-0003xQ-OC for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 11:36:13 -0400 Received: from plane.gmane.org ([80.91.229.3]:45897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTDM8-0003xJ-HR for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 11:36:08 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UTDM4-00077b-MV for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 17:36:04 +0200 Received: from g231107063.adsl.alicedsl.de ([92.231.107.63]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Apr 2013 17:36:04 +0200 Received: from tjolitz by g231107063.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Apr 2013 17:36:04 +0200 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: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Thorsten Jolitz 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