emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: [BUG] Cannot export a raw link
Date: Mon, 14 Apr 2014 21:19:10 +0200	[thread overview]
Message-ID: <87ha5vra6p.fsf@Rainer.invalid> (raw)
In-Reply-To: 87d2gjhglr.fsf@gmail.com

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

  reply	other threads:[~2014-04-14 19:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14  9:18 [BUG] Cannot export a raw link Bastien
2014-04-14 11:16 ` Nicolas Goaziou
2014-04-14 17:07   ` Achim Gratz
2014-04-14 19:10     ` Nicolas Goaziou
2014-04-14 19:19       ` Achim Gratz [this message]
2014-04-14 20:06         ` Nicolas Goaziou
2014-04-16  7:15           ` Nicolas Goaziou
2014-04-16 18:38             ` Achim Gratz
2014-04-17  6:35             ` Bastien
2014-04-17 11:06               ` Nicolas Goaziou
2014-04-17 11:26                 ` Bastien
2014-04-17 19:51                   ` Nicolas Goaziou
2014-04-17 19:56                     ` Bastien
2014-05-03 18:21             ` Michael Brand
2014-05-04 19:43               ` 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=87ha5vra6p.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /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).