From: "Erik Sjöstrand" <sjostrand.erik@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: Link descriptions in org-element parser
Date: Mon, 22 May 2017 07:51:57 +0000 [thread overview]
Message-ID: <CABHaYhUnZOi-r9ygofWadpnGgKn4iLc87rW9hHvmPfYNZTbQsw@mail.gmail.com> (raw)
In-Reply-To: <87y3tphkka.fsf@nicolasgoaziou.fr>
[-- Attachment #1: Type: text/plain, Size: 1818 bytes --]
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
>
[-- Attachment #2: Type: text/html, Size: 2327 bytes --]
next prev parent reply other threads:[~2017-05-22 7:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-21 21:35 Bug: Link descriptions in org-element parser Erik Sjöstrand
2017-05-21 23:11 ` Nicolas Goaziou
2017-05-22 7:51 ` Erik Sjöstrand [this message]
2017-05-22 11:37 ` Nicolas Goaziou
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABHaYhUnZOi-r9ygofWadpnGgKn4iLc87rW9hHvmPfYNZTbQsw@mail.gmail.com \
--to=sjostrand.erik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.