emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Fabrice Popineau <fabrice.popineau@supelec.fr>
Cc: Neil Jerram <neil@ossau.homelinux.net>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
	fabrice.popineau@centralesupelec.fr
Subject: Re: Escaping links
Date: Sat, 19 Aug 2017 11:15:25 +0200	[thread overview]
Message-ID: <87wp5zlxzm.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAFgFV9N_xkfHks7TK1aJDkSG-uS=G7CMgeT9ugTaqUasr5yUqQ@mail.gmail.com> (Fabrice Popineau's message of "Mon, 14 Aug 2017 18:35:54 +0200")

Hello,

Fabrice Popineau <fabrice.popineau@supelec.fr> writes:

> You could also prefix the link by a string holding (in ascii) the number of
> bytes of the unencoded link.
>
> But that makes raw/manual editing of an org file much harder.

I'd rather have something simple.

Here are some suggestions.

1. Replace "\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]"
   (`org-bracket-link-regexp') with
   "\\[\\[\\([^\000]+?\\)\\]\\(\\[\\([^\000]+?\\)\\]\\)?\\]". This gives
   more possibilities. We will just live with the unsupported cases
   (e.g. square brackets at the end of the path or the description).

2. Use good ole backslash character to escape ambiguous characters (even
   though any character can be escaped). `org-link-unescape' would take
   care of them instead of url-encoded characters.

3. A mix of both. `org-bracket-link-regexp' could become more
   complicated though.

I'm open to other suggestions, as long as they do not massively impede
manual editing.

Regards,

-- 
Nicolas Goaziou

      reply	other threads:[~2017-08-19  9:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-11 13:26 Escaping links Fabrice Popineau
2017-08-11 15:13 ` Nicolas Goaziou
2017-08-11 17:31   ` John Kitchin
2017-08-11 19:54     ` Fabrice Popineau
2017-08-12 10:44     ` Nicolas Goaziou
2017-08-12 14:01       ` John Kitchin
2017-08-14 16:26         ` Neil Jerram
2017-08-14 16:35           ` Fabrice Popineau
2017-08-19  9:15             ` Nicolas Goaziou [this message]

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=87wp5zlxzm.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=fabrice.popineau@centralesupelec.fr \
    --cc=fabrice.popineau@supelec.fr \
    --cc=neil@ossau.homelinux.net \
    /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).