[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [BUG] Cannot export a raw link
From: |
Achim Gratz |
Subject: |
Re: [O] [BUG] Cannot export a raw link |
Date: |
Mon, 14 Apr 2014 21:19:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
Nicolas Goaziou writes:
> With latest patch and following Org buffer
>
> file:test.org
> file:/test.org
> file:///test.org
>
> I get (HTML export)
>
> <a href="test.html">test.html</a>
> <a href="file:///test.html">file:///test.html</a>
> <a href="file:///test.html">file:///test.html</a>
>
> 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
>
> <a href="hostname/test.html">test.html</a>
>
> 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
- [O] [BUG] Cannot export a raw link, Bastien, 2014/04/14
- Re: [O] [BUG] Cannot export a raw link, Nicolas Goaziou, 2014/04/14
- Re: [O] [BUG] Cannot export a raw link, Achim Gratz, 2014/04/14
- Re: [O] [BUG] Cannot export a raw link, Nicolas Goaziou, 2014/04/14
- Re: [O] [BUG] Cannot export a raw link,
Achim Gratz <=
- Re: [O] [BUG] Cannot export a raw link, Nicolas Goaziou, 2014/04/14
- Re: [O] [BUG] Cannot export a raw link, Nicolas Goaziou, 2014/04/16
- Re: [O] [BUG] Cannot export a raw link, Achim Gratz, 2014/04/16
- Re: [O] [BUG] Cannot export a raw link, Bastien, 2014/04/17
- Re: [O] [BUG] Cannot export a raw link, Nicolas Goaziou, 2014/04/17
- Re: [O] [BUG] Cannot export a raw link, Bastien, 2014/04/17
- Re: [O] [BUG] Cannot export a raw link, Nicolas Goaziou, 2014/04/17
- Re: [O] [BUG] Cannot export a raw link, Bastien, 2014/04/17