From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chunyang Xu 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 Message-ID: References: <87k2547x5t.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dEpiP-0007UA-Ga for emacs-orgmode@gnu.org; Sun, 28 May 2017 00:22:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dEpiM-00014J-CP for emacs-orgmode@gnu.org; Sun, 28 May 2017 00:22:05 -0400 Received: from smtpproxy19.qq.com ([184.105.206.84]:55187) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dEpiM-00013j-3f for emacs-orgmode@gnu.org; Sun, 28 May 2017 00:22:02 -0400 In-Reply-To: <87k2547x5t.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org, =?utf-8?B?5p6X6ZWH5Zu9?= --=-=-= Content-Type: text/plain Nicolas Goaziou writes: > Hello, > > Chunyang Xu 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Exclude-and-in-org-plain-link-re.patch >From c0b86176dc99f63385bcebc1ccbcb5d41f062a2c Mon Sep 17 00:00:00 2001 From: Chunyang Xu 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 --=-=-= Content-Type: text/plain > Regards, > > -- > Nicolas Goaziou --=-=-=--