emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: missing element in org-element.el
Date: Fri, 19 Apr 2013 17:35:54 +0200	[thread overview]
Message-ID: <87sj2mcz39.fsf@gmail.com> (raw)
In-Reply-To: 8761zipowf.fsf@gmail.com

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Thorsten Jolitz <tjolitz@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

  reply	other threads:[~2013-04-19 15:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19 14:30 missing element in org-element.el Thorsten Jolitz
2013-04-19 14:37 ` Nicolas Goaziou
2013-04-19 15:35   ` Thorsten Jolitz [this message]
2013-04-19 16:31     ` Nicolas Goaziou
2013-04-19 16:41       ` Thorsten Jolitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sj2mcz39.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).