From: Tobias Getzner <tobias.getzner@gmx.de>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org
Subject: Re: Multi-line links
Date: Sun, 06 Jul 2014 18:25:40 +0200 [thread overview]
Message-ID: <1404663940.11764.1.camel@wirrsal> (raw)
In-Reply-To: <87egxz3q8m.fsf@nicolasgoaziou.fr>
Hello Nicolas,
On Sun, 2014-07-06 at 09:23 +0200, Nicolas Goaziou wrote:
> Tobias Getzner <tobias.getzner@gmx.de> writes:
> > On Wed, 2014-07-02 at 12:39 +0200, Tobias Getzner wrote:
> > One additional issue I’ve hit upon is that the link :path returned by
> > org-mode is also truncated after a newline, while the :raw-link is
> > correctly returned in full.
>
> Could you provide an example?
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…».
Apart from the truncation issue, the link itself can be triggered only
via the first two lines, while the last line yields «no link found»,
despite the fact that the last line is syntax-highlighted and
clickable.
> Note that Org links do not allow newline characters in the "link" part.
> Is it really an issue or a limitation?
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. On the other hand, the implementation seems to
already support n-line links for the arbitrary value of 2 (with the
caveat that the :path value currently breaks).
The reason why I consider it a limitation is cases like the one I
initially outlined. An extension like org-ref might want to internally
parse the link path, and it makes sense to allow newlines as separators
here, so that the links remain legible and so one can have hard
line-breaks at 80 cols. In particular, BibTeX-based links can become
very long. If one prefers hard line-breaks, these links will impair the
readability of the document.
On the other hand, it’s an inconsistency that these links will be
correctly syntax-highlighted and clickable on every line, with the
handler then breaking on lines > 2 and with a truncated :path.
Since link paths and descriptions cannot contain square brackets, would
it be possible to rely just on these to terminate link parsing?
In an earlier post of yours, you seem to have identified the relevant
code responsible for this:
http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg00532.html
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?
Best regards,
Tobias
next prev parent reply other threads:[~2014-07-06 16:26 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 [this message]
2014-07-06 19:28 ` Nicolas Goaziou
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=1404663940.11764.1.camel@wirrsal \
--to=tobias.getzner@gmx.de \
--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 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).