[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Preserving links when using org-element-interpret-data

From: Nicolas Goaziou
Subject: Re: [O] Preserving links when using org-element-interpret-data
Date: Sun, 09 Oct 2016 09:44:35 +0200


Thibault Marin <address@hidden> writes:

> I am trying to use the org-element tools to modify an org file from elisp code
> and I was wondering if the `org-element-parse-buffer' /
> `org-element-interpret-data' combo should result in the same content as the
> original buffer.

There is no guarantee that they return the same original buffer.
Actually, it is highly unlikely. Some information, not useful to Org, is
ignored during parsing (e.g., global indentation, case for keywords...).

However, they will return an equivalent buffer, in the sense that both
the produced and the original one have the same parse tree.

> I am having issues with links where the target and the
> description are both =file:= entries.


> The input link is transformed from
> #+begin_example
> [[file:a.png][file:a.png]]
> #+end_example
> to
> #+begin_example
> [[file:a.png][[[file:a.png]]]]
> #+end_example
> Are the additional brackets in the description expected?

No, this is a genuine bug. This is now fixed. Thank you.


Nicolas Goaziou

reply via email to

[Prev in Thread] Current Thread [Next in Thread]