From: Chunyang Xu <mail@xuchunyang.me>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org, 林镇国 <mistkafka@gmail.com>
Subject: Re: Bug: link formating problem [9.0.5 (9.0.5-elpaplus @ /Users/mistkafka/.emacs.d/elpa/org-plus-contrib-20170210/)]
Date: Sun, 28 May 2017 12:21:55 +0800 [thread overview]
Message-ID: <m28tlhvcf0.fsf@xuchunyang.me> (raw)
In-Reply-To: <87k2547x5t.fsf@nicolasgoaziou.fr>
[-- Attachment #1: Type: text/plain, Size: 538 bytes --]
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Chunyang Xu <mail@xuchunyang.me> writes:
>
>> I changed `org-plain-link-re' to make it not longer think "[" and "]"
>> are valid characters in a URL, which solves the problem.
>
> Thank you.
>
> I solved the problem differently, but your suggestion still makes sense.
> Would you mind making it a proper patch, using "git format-patch", with
> a proper commit message? Don't forget to add TINYCHANGE cookie at the
> end if you haven't signed papers yet.
Here is the patch.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Exclude-and-in-org-plain-link-re.patch --]
[-- Type: text/x-patch, Size: 921 bytes --]
From c0b86176dc99f63385bcebc1ccbcb5d41f062a2c Mon Sep 17 00:00:00 2001
From: Chunyang Xu <mail@xuchunyang.me>
Date: Sun, 28 May 2017 12:10:58 +0800
Subject: [PATCH] Exclude '[' and ']' in `org-plain-link-re'
* lisp/org.el (org-make-link-regexps): Do it.
TINYCHANGE
---
lisp/org.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index 102a9b265..c2818299e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5687,7 +5687,7 @@ This should be called after the variable `org-link-parameters' has changed."
org-plain-link-re
(concat
"\\<" types-re ":"
- "\\([^ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] \t\n]\\|/\\)\\)\\)")
+ "\\([^][ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] \t\n]\\|/\\)\\)\\)")
;; "\\([^]\t\n\r<>() ]+[^]\t\n\r<>,.;() ]\\)")
org-bracket-link-regexp
"\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]"
--
2.13.0
[-- Attachment #3: Type: text/plain, Size: 38 bytes --]
> Regards,
>
> --
> Nicolas Goaziou
next prev parent reply other threads:[~2017-05-28 4:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-13 6:03 Bug: link formating problem [9.0.5 (9.0.5-elpaplus @ /Users/mistkafka/.emacs.d/elpa/org-plus-contrib-20170210/)] 林镇国
2017-05-23 6:37 ` Nicolas Goaziou
2017-05-24 13:48 ` Chunyang Xu
2017-05-24 13:56 ` Kaushal Modi
2017-05-26 8:05 ` Chunyang Xu
2017-05-26 8:09 ` Chunyang Xu
2017-05-26 10:03 ` Nicolas Goaziou
2017-05-27 16:13 ` Kaushal Modi
2017-05-27 19:12 ` Chunyang Xu
2017-05-27 19:53 ` Achim Gratz
2017-05-28 4:21 ` Chunyang Xu [this message]
2017-05-28 7:41 ` 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=m28tlhvcf0.fsf@xuchunyang.me \
--to=mail@xuchunyang.me \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
--cc=mistkafka@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).