From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Achim Gratz <Stromeko@nexgo.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] Cannot export a raw link
Date: Mon, 14 Apr 2014 21:10:40 +0200 [thread overview]
Message-ID: <87d2gjhglr.fsf@gmail.com> (raw)
In-Reply-To: <87y4z7rgas.fsf@Rainer.invalid> (Achim Gratz's message of "Mon, 14 Apr 2014 19:07:07 +0200")
Hello,
Achim Gratz <Stromeko@nexgo.de> writes:
> It still isn't correct. If you put "//" after a "file:" scheme, then
> you need to put an authority there (an empty authority means localhost
> in some contexts, but then the path has to start with a slash).
The patch didn't change "file" scheme handling. It changed "http",
"https" and "ftp".
> Also, with the new implementation relative file: links would stop
> working. A relative file link cannot have any slashes after the
> scheme, while an absolute path must have three (not going into the
> vagaries of trying to use UNC paths and file links that work around
> the security policies of various web browsers).
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.
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.
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.
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.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2014-04-14 19:10 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 [this message]
2014-04-14 19:19 ` Achim Gratz
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=87d2gjhglr.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=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).