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:
parent
6539b0d3f9
commit
453492ca95
|
@ -11131,18 +11131,18 @@ of matched result, with is either `dedicated' or `fuzzy'."
|
||||||
"\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\]"
|
"\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\]"
|
||||||
wspaceopt
|
wspaceopt
|
||||||
"\\)"))
|
"\\)"))
|
||||||
(sep (concat "\\(?:" wspace "+\\|" cookie "+\\)"))
|
(sep (concat "\\(?:\\(?:" wspace "\\|" cookie "\\)+\\)"))
|
||||||
(re (concat
|
(re (concat
|
||||||
org-outline-regexp-bol
|
org-outline-regexp-bol
|
||||||
"\\(?:" org-todo-regexp "[ \t]+\\)?"
|
"\\(?:" org-todo-regexp "[ \t]+\\)?"
|
||||||
"\\(?:\\[#.\\][ \t]+\\)?"
|
"\\(?:\\[#.\\][ \t]+\\)?"
|
||||||
"\\(?:" org-comment-string "[ \t]+\\)?"
|
"\\(?:" org-comment-string "[ \t]+\\)?"
|
||||||
sep "*"
|
sep "?"
|
||||||
(let ((title (mapconcat #'regexp-quote
|
(let ((title (mapconcat #'regexp-quote
|
||||||
words
|
words
|
||||||
(concat sep "+"))))
|
sep)))
|
||||||
(if starred (substring title 1) title))
|
(if starred (substring title 1) title))
|
||||||
sep "*"
|
sep "?"
|
||||||
(org-re "\\(?:[ \t]+:[[:alnum:]_@#%%:]+:\\)?")
|
(org-re "\\(?:[ \t]+:[[:alnum:]_@#%%:]+:\\)?")
|
||||||
"[ \t]*$")))
|
"[ \t]*$")))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
|
Loading…
Reference in New Issue