Hi!

I've updated to org-mode 9.0.7 but the problem remains. With this org-mode buffer

    [[info:emacs#Directory%20variables][info:Directory variables]]

org-element-parse-buffer give the following (indented):

(org-data
 nil
 (section
  (:begin 1 :end 92 :contents-begin 1 :contents-end 92 :post-blank 0 :post-affiliated 1 :parent #0)
  (paragraph
   (:begin 1 :end 65 :contents-begin 1 :contents-end 64 :post-blank 1 :post-affiliated 1 :parent #1)
   (link
    (:type info :path emacs#Directory%20variables :format bracket :raw-link info:emacs#Directory%20variables :application nil :search-option nil :begin 1 :end 63 :contents-begin 37 :contents-end 61 :post-blank 0 :parent #2)
    (link (:type info :path Directory :format plain :raw-link info:Directory :application nil :search-option nil :begin 37 :end 52 :contents-begin nil :contents-end nil :post-blank 1 :parent #3))
    variables))))

So the org-element-contents of the link is another link.


On Mon, May 22, 2017 at 1:11 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Hello,

Erik Sjöstrand <sjostrand.erik@gmail.com> writes:

> When having an link where the link's description also look like a link,
> the description will be treated like a link by org-element. As an
> example:
>
>     [[info:emacs#Directory%20Variables][info:Directory Variables]]
>
> If the above was an org-file, org-element-parse-buffer would find two
> links in the buffer, but the above is really just one link even though
> its description look like a link. A consequence of this is that the
> org-element-contents of the link above would be another link, which can
> cause bugs.

IIRC, this was fixed a while ago. You may want to update Org.

Regards,

--
Nicolas Goaziou