From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: emacs-orgmode@gnu.org
Cc: Fabrice Popineau <fabrice.popineau@gmail.com>
Subject: Re: Links
Date: Wed, 17 Jun 2015 11:47:38 +0200 [thread overview]
Message-ID: <87ioam8y4l.fsf@selenimh.access.network> (raw)
In-Reply-To: <20150617064456.GB28351@chitra.no-ip.org> (Suvayu Ali's message of "Wed, 17 Jun 2015 08:44:56 +0200")
Hello,
Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> Would it make sense to "promote" these kind of encoded links to almost
> their own sub-types? I would guess, almost no one enters these encoded
> links by hand. It's either via copy paste in the prompt from
> org-insert-link, or by entering [[encoded-link][description]] by hand.
> I think it is a reasonable inconvenience to ask the user to prefix it
> with something like uri:. I mostly see advantages for a minor
> inconvenience.
I don't think we should go as far as changing link syntax for this.
Actually, the problem lies in internal links, since external ones are
expected to be url-encoded when necessary.
Internal links only require url-encoding when they contain square
brackets. So, we can make a guess: if a string either doesn't contain
"%5B" or "%5D", or contains any character in `org-link-escape-chars'
(with the exception of the percent sign), it cannot be encoded.
Otherwise, we can assume it is encoded. In this case, there are false
positives, but those are sufficiently rare (i.e., an internal link with
either "%5B" or "%5D" and no space in it) this should not be a problem
in practice.
There is an important drawback however, as in the prefix proposal:
currently encoded internal links (e.g. "Headline%201") will break.
> Although, you still have to handle the ambiguous case for existing Org
> files. Unless this double maintenance is cumbersome, I would vote for
> introducing such a scheme.
The double maintenance is not possible. Either we take into
consideration the prefix or the heuristic rule above, and some links are
going to break, or we allow to bypass it and it doesn't improve the
situation.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2015-06-17 9:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 12:11 Links Fabrice Popineau
2015-06-16 12:50 ` Links Nicolas Goaziou
2015-06-16 13:32 ` Links Fabrice Popineau
2015-06-16 21:30 ` Links Nicolas Goaziou
2015-06-17 6:44 ` Links Suvayu Ali
2015-06-17 9:47 ` Nicolas Goaziou [this message]
2015-06-18 23:41 ` Links Suvayu Ali
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=87ioam8y4l.fsf@selenimh.access.network \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=fabrice.popineau@gmail.com \
/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).