summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip <pipcet@gmail.com>2015-08-13 18:49:56 +0000
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-08-14 22:33:08 +0200
commit453492ca957d3a2bf06d17eb89be1a9a99e815f2 (patch)
tree62b192487940e321cab0e94979bf948e9e514f74
parent6539b0d3f95dcd7bc8531b402e5f75e5d5cb3c32 (diff)
downloadorg-mode-453492ca957d3a2bf06d17eb89be1a9a99e815f2.tar.gz
org.el: Fix recursive regexp backtracking
* org.el (org-link-search): Avoid recursive regexp backtracking behavior when following search links. <http://article.gmane.org/gmane.emacs.orgmode/100010> TINYCHANGE
-rwxr-xr-xlisp/org.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 7984bde..ec4a59c 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11131,18 +11131,18 @@ of matched result, with is either `dedicated' or `fuzzy'."
"\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\]"
wspaceopt
"\\)"))
- (sep (concat "\\(?:" wspace "+\\|" cookie "+\\)"))
+ (sep (concat "\\(?:\\(?:" wspace "\\|" cookie "\\)+\\)"))
(re (concat
org-outline-regexp-bol
"\\(?:" org-todo-regexp "[ \t]+\\)?"
"\\(?:\\[#.\\][ \t]+\\)?"
"\\(?:" org-comment-string "[ \t]+\\)?"
- sep "*"
+ sep "?"
(let ((title (mapconcat #'regexp-quote
words
- (concat sep "+"))))
+ sep)))
(if starred (substring title 1) title))
- sep "*"
+ sep "?"
(org-re "\\(?:[ \t]+:[[:alnum:]_@#%%:]+:\\)?")
"[ \t]*$")))
(goto-char (point-min))