From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Multi-line links Date: Sun, 06 Jul 2014 21:28:17 +0200 Message-ID: <87tx6uxp66.fsf@nicolasgoaziou.fr> References: <1404297563.12348.4.camel@glenalbyn> <1404308028.12348.7.camel@glenalbyn> <87egxz3q8m.fsf@nicolasgoaziou.fr> <1404663940.11764.1.camel@wirrsal> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3s6G-0005Tr-2d for emacs-orgmode@gnu.org; Sun, 06 Jul 2014 15:27:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3s67-00088A-U6 for emacs-orgmode@gnu.org; Sun, 06 Jul 2014 15:27:47 -0400 Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:58326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3s67-000869-N4 for emacs-orgmode@gnu.org; Sun, 06 Jul 2014 15:27:39 -0400 In-Reply-To: <1404663940.11764.1.camel@wirrsal> (Tobias Getzner's message of "Sun, 06 Jul 2014 18:25:40 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Tobias Getzner Cc: emacs-orgmode@gnu.org Hello, Tobias Getzner 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 =C2=ABgreen1994hybridreasoningmodel,=C2=BB, i.=E2=80=AFe., the= :path is > truncated after the newline. The raw-path will be correct, however, > i.=E2=80=AFe., =C2=ABcitet:green1994hybrid=E2=80=A6,\ngreen1994generating= =E2=80=A6,\ngreen1992=E2=80=A6=C2=BB. 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., 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, --=20 Nicolas Goaziou