[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bug: link formating problem [9.0.5 (9.0.5-elpaplus @ /Users/mist
From: |
Chunyang Xu |
Subject: |
Re: [O] 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 |
Nicolas Goaziou <address@hidden> writes:
> Hello,
>
> Chunyang Xu <address@hidden> 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.
>From c0b86176dc99f63385bcebc1ccbcb5d41f062a2c Mon Sep 17 00:00:00 2001
From: Chunyang Xu <address@hidden>
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
> Regards,
>
> --
> Nicolas Goaziou