emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Michael Brand <michael.ch.brand@gmail.com>
Cc: org mode <emacs-orgmode@gnu.org>
Subject: Re: [BUG] External unicode links without a description in ox-html
Date: Tue, 26 Jul 2016 21:05:15 +0200	[thread overview]
Message-ID: <87oa5ku43i.fsf@saiph.selenimh> (raw)
In-Reply-To: <CALn3zog2PM-oovkD0EXTiq2NVLcz+91yzj5k0mZoir1LNQQ_-g@mail.gmail.com> (Michael Brand's message of "Mon, 25 Jul 2016 22:33:52 +0200")

Hello,

Michael Brand <michael.ch.brand@gmail.com> writes:

>>    This prevent any link with a description to contain either "]]" or
>
> ... a single bracket at the border or a link destination part to
> contain "][" or "]]" or a single bracket at the border or ...

Correct.

>>    multiple spaces, but these requirements are so uncommon we probably
>>    shouldn't bother.
>
> I never had such links and don't bother. If I am right these could
> even be tweaked manually with %20, %5B and %5D to get working.

Not really, because Org would no longer un-escape the URI. This could
work for links opened with a browser, but not for other types (e.g.,
a target).

> Do I understand right that not escaping and unescaping would allow
>
> :   https://duckduckgo.com/?q=[dest]dest

This one is already possible, isn't it? Also, I suggest to change
brackets links, not plain links.

> : [[https://duckduckgo.com/?q=[dest]dest]]
> : [[https://duckduckgo.com/?q=[dest]dest][desc[desc]desc]]

Yes, those would become valid. The following regexp could be used as
a replacement for `org-bracket-link-regexp'

  "\\[\\[[^]+?\\(\\]\\[[^]]\\)?\\]\\]"

or, with groups,

  "\\[\\[\\([^]+?\\)\\(?:\\]\\[\\([^]+?\\)\\)?\\]\\]"


Regards,

-- 
Nicolas Goaziou

      reply	other threads:[~2016-07-26 19:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20 14:44 [BUG] External unicode links without a description in ox-html Arun Isaac
2016-07-20 20:04 ` Nicolas Goaziou
2016-07-23 15:34   ` Michael Brand
2016-07-25 12:52     ` Nicolas Goaziou
2016-07-25 20:33       ` Michael Brand
2016-07-26 19:05         ` 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=87oa5ku43i.fsf@saiph.selenimh \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=michael.ch.brand@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).