Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [Orgmode] Recognize underscores in URL
Date: Thu, 12 Aug 2010 22:59:39 -0000
From: Nicolas Goaziou <address@hidden>
X-Patchwork-Id: 214
Message-Id: <address@hidden>
To: Org Mode List <address@hidden>
Hello,
This needs some testing as it may break something else, but the
following patch should prevent underscores in URL from introducing
subscript.
Regards,
-- Nicolas
From dd068df8a0e43a1a4ee85559bddb7ef2dbfa72bd Mon Sep 17 00:00:00
2001
From: Nicolas Goaziou <address@hidden>
Date: Thu, 12 Aug 2010 19:47:29 +0200
Subject: [PATCH] Recognize URL with underscores
* org.el (org-make-link-regexps): modified regexp of org-plain-link-
re.
---
lisp/org.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 31d2411..4560488 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4851,7 +4851,7 @@ This should be called after the variable `org-
link-types' has changed."
org-plain-link-re
(concat
"\\<\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):"
- (org-re "\\([^ \t\n()<>]+\\(?:([[:word:]0-9]+)\\|\\([^[:punct:]
\t\n]\\|/\\)\\)\\)"))
+ (org-re "\\([^ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:]
\t\n]\\|/\\)\\)\\)"))
;; "\\([^]\t\n\r<>() ]+[^]\t\n\r<>,.;() ]\\)")
org-bracket-link-regexp
"\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]"