From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: [BUG] Cannot export a raw link Date: Mon, 14 Apr 2014 21:19:10 +0200 Message-ID: <87ha5vra6p.fsf@Rainer.invalid> References: <87mwfofewj.fsf@bzg.ath.cx> <87ob04gnz1.fsf@gmail.com> <87y4z7rgas.fsf@Rainer.invalid> <87d2gjhglr.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZmPm-0005I3-Ax for emacs-orgmode@gnu.org; Mon, 14 Apr 2014 15:19:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WZmPe-0002Tc-U5 for emacs-orgmode@gnu.org; Mon, 14 Apr 2014 15:19:34 -0400 Received: from plane.gmane.org ([80.91.229.3]:38328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZmPe-0002TL-NL for emacs-orgmode@gnu.org; Mon, 14 Apr 2014 15:19:26 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WZmPZ-0001KY-Qs for emacs-orgmode@gnu.org; Mon, 14 Apr 2014 21:19:21 +0200 Received: from pd9eb331c.dip0.t-ipconnect.de ([217.235.51.28]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Apr 2014 21:19:21 +0200 Received: from Stromeko by pd9eb331c.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Apr 2014 21:19:21 +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: emacs-orgmode@gnu.org Nicolas Goaziou writes: > With latest patch and following Org buffer > > file:test.org > file:/test.org > file:///test.org > > I get (HTML export) > > test.html > file:///test.html > file:///test.html > > So, it looks good so far. groff has this snippet: --8<---------------cut here---------------start------------->8--- (if (file-name-absolute-p raw-path) (concat "file://" (expand-file-name raw-path)) (concat "file://" raw-path))) --8<---------------cut here---------------end--------------->8--- which unconditionally adds an authority if I read it correctly. > Unfortunately, it fails with a non-empty authority. E.g., > > file://hostname/test.org > > becomes > > test.html > > So it is not satisfactory. Right, I didn't read as far into the patch. > One possibility is to store somewhere in the parsed link that the URI > provided the "//" part, and, if so, re-introduce it unconditionally when > building back the link. Well, there's the option of correctly parsing into scheme, authority, path, query and fragment... But that is probably not going into 8.2.6 in any case. https://tools.ietf.org/html/rfc3986 > Another one is to drop the whole thing, return to previous state, and > implement ad-hoc rules to fix "file:", which is probably the only scheme > introducing problems. I forgot what the previous state was, but trying to fix file: URIs without correctly parsing them sounds like a losing proposition. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada