From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Tobias Getzner <tobias.getzner@gmx.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Multi-line links
Date: Sun, 06 Jul 2014 21:28:17 +0200 [thread overview]
Message-ID: <87tx6uxp66.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <1404663940.11764.1.camel@wirrsal> (Tobias Getzner's message of "Sun, 06 Jul 2014 18:25:40 +0200")
Hello,
Tobias Getzner <tobias.getzner@gmx.de> writes:
> My original example also applies to this issue.
>
> [[citet:green1994hybridreasoningmodel,
> green1994generatingindirectanswers,
> green1992conversationalimplicaturesindirect]]
>
> Clicking on the first line in the above link, the returned :path will
> be just be «green1994hybridreasoningmodel,», i. e., the :path is
> truncated after the newline. The raw-path will be correct, however,
> i. e., «citet:green1994hybrid…,\ngreen1994generating…,\ngreen1992…».
This is because `org-element-link-parser' uses internally
`org-link-re-with-space3' for analysis.
> According to the syntax spec, newlines should be allowed both in the
> link path and in the description, but I realize the syntax spec is kind
> of after-the-fact.
Actually, it's a mistake in the syntax specifications. No newlines
characters are allowed in paths (see for example `org-non-link-chars')
at the moment.
> Since link paths and descriptions cannot contain square brackets, would
> it be possible to rely just on these to terminate link parsing?
Links are not limited to square bracket syntax. There are also angle
links (e.g., <http://orgmode.org> and plain links: http://orgmode.org).
> If there is some strong reason for a hard-coded limit, would it be
> possible to expose the limit as a user-definable variable, and to fix
> the :path truncation issue?
I don't think there is a strong reason for that limitation.
RFC 3986 (Appendix C) suggests how to handle multi-lines URI. We could
use it to handle such links.
Note that there is more than "org-element.el" to change though (e.g.,
`org-make-link-regexps') and some parts of Org relying only on regexps
to extract the path, may not work properly with such links.
Do you want to work on such a patch?
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2014-07-06 19:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-02 10:39 Multi-line links Tobias Getzner
2014-07-02 13:33 ` Tobias Getzner
2014-07-06 7:23 ` Nicolas Goaziou
2014-07-06 16:25 ` Tobias Getzner
2014-07-06 19:28 ` Nicolas Goaziou [this message]
2014-07-22 11:12 ` Tobias Getzner
2014-07-26 13:32 ` Nicolas Goaziou
2014-08-04 11:03 ` Tobias Getzner
2014-08-06 11:36 ` 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
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=87tx6uxp66.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=tobias.getzner@gmx.de \
/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).