emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Thorsten Jolitz <tjolitz@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Tabular overview of org-element.el
Date: Sat, 20 Apr 2013 19:42:58 +0200	[thread overview]
Message-ID: <87ehe5nlnh.fsf@gmail.com> (raw)
In-Reply-To: <87k3nx3yz5.fsf@gmail.com> (Thorsten Jolitz's message of "Sat, 20 Apr 2013 19:15:26 +0200")

Thorsten Jolitz <tjolitz@gmail.com> writes:

> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
>> Hello,
>>
>> Thorsten Jolitz <tjolitz@gmail.com> writes:
>>
>>> I prepared a tabular overview of org-element.el to get a better
>>> understanding of how Nicolas modeled and Org file, and I thought it
>>> might be useful for others so I share it here. 
>>>
>>> I did not know where to put 'plain-link', but maybe I simply overlooked
>>> it in one place.
>>
>> It belongs to `org-element-all-successors', which means it is
>> a successor. Actually, it is a dumbed down successor for links, as it
>> only finds plain links, i.e. links with no markup at all. E.g.,
>>
>>   http://orgmode.org
>>
>> This is necessary as some contexts (i.e. link descriptions) can only
>> contain such links.
>
>
> Whats kind of confusing for me is that all other successors are either
> 'atomic' objects or 'object-categories' containing 'atomic' objects:
>
> ,--------------------------------------------------------------------
> | Object              Recur?  Successor(type)  SecVal-Location
> |   -----------------------------------------------------------------
> |    bold                X       text-markup
> |    code                        text-markup
> |    entity                      latex-or-entity
> |    export-snippet              X
> |    footnote-reference          X                :inline-definition
> |    inline-babel-call           X
> |    inline-src-block            X
> |    italic              X       text-markup
> |    line-break                  X
> |    latex-fragment              latex-or-entity
> |    link                X       X
> |    macro                       X
> |    radio-target        X       X
> |    statistics-cookie           X
> |    strike-through      X       text-markup
> |    subscript           X       sub/superscript
> |    superscript         X       sub/superscript
> |    table-cell          X       X
> |    target                      X
> |    timestamp                   X
> |    underline           X       text-markup
> |    verbatim                    text-markup
> `--------------------------------------------------------------------
>
> Only plain-link is an 'outlier' in this systematic. What is a link like 
>
> ,-------------------
> | http://orgmode.org
> `-------------------
>
> then, when encountered in an Org document? If its not an object nor an
> element, then it is (anonymous) part of the String that forms a paragraph?
> Its easy to understand that some objects can be successors of other
> objects/elements, others not, and that its sometimes convenient to
> organize similar successor objects into successor-categories. 
>
> Its not so easy to understand how something can be a successor but not
> an object.

"http://orgmode.org" _is_ a link object, like [[http://orgmode.org]].
There are two successors for the same object type, one being more
selective than the other.

This special successor was introduced (lately) because there was no
image syntax in Org. So we needed to recognize:

  [[http://orgmode.org][./unicorn.jpg]]

as an image pointing to an URL. In fact, we could separate `plain-link'
objects from `link' objects, but the benefit is not obvious, so
`plain-link' is just considered as a sub-type of `link'.


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2013-04-20 17:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-20 15:18 Tabular overview of org-element.el Thorsten Jolitz
2013-04-20 16:34 ` Nicolas Goaziou
2013-04-20 17:15   ` Thorsten Jolitz
2013-04-20 17:42     ` Nicolas Goaziou [this message]
2013-04-20 18:45       ` Thorsten Jolitz
2013-04-20 19:07         ` Nicolas Goaziou
2013-04-20 20:45           ` 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=87ehe5nlnh.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tjolitz@gmail.com \
    /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).