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
This commit is contained in:
Philip 2015-08-13 18:49:56 +00:00 committed by Nicolas Goaziou
parent 6539b0d3f9
commit 453492ca95
1 changed files with 4 additions and 4 deletions

View File

@ -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))