Revert "(org-scan-tags): Optimize a bit the regexp search."
This reverts commit 0b7ce5f47d
.
This commit is contained in:
parent
712031900f
commit
dfbdc547d5
13
lisp/org.el
13
lisp/org.el
|
@ -12229,10 +12229,10 @@ MATCHER is a Lisp form to be evaluated, testing if a given set of tags
|
||||||
qualifies a headline for inclusion. When TODO-ONLY is non-nil,
|
qualifies a headline for inclusion. When TODO-ONLY is non-nil,
|
||||||
only lines with a TODO keyword are included in the output."
|
only lines with a TODO keyword are included in the output."
|
||||||
(require 'org-agenda)
|
(require 'org-agenda)
|
||||||
(let* ((re (concat "^" outline-regexp " *"
|
(let* ((re (concat "^" outline-regexp " *\\(\\<\\("
|
||||||
(when todo-only
|
(mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
|
||||||
(concat "\\(" (regexp-opt org-todo-keywords-1) "\\)"))
|
(org-re
|
||||||
(org-re " *\\(.*?\\)\\(\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \t]*$")))
|
"\\>\\)\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$")))
|
||||||
(props (list 'face 'default
|
(props (list 'face 'default
|
||||||
'done-face 'org-agenda-done
|
'done-face 'org-agenda-done
|
||||||
'undone-face 'default
|
'undone-face 'default
|
||||||
|
@ -12259,9 +12259,8 @@ only lines with a TODO keyword are included in the output."
|
||||||
(org-remove-occur-highlights))
|
(org-remove-occur-highlights))
|
||||||
(while (re-search-forward re nil t)
|
(while (re-search-forward re nil t)
|
||||||
(catch :skip
|
(catch :skip
|
||||||
(when todo-only (setq todo (org-match-string-no-properties 1)))
|
(setq todo (if (match-end 1) (org-match-string-no-properties 2))
|
||||||
(setq tags (or (org-match-string-no-properties 4)
|
tags (if (match-end 4) (org-match-string-no-properties 4)))
|
||||||
(org-match-string-no-properties 3)))
|
|
||||||
(goto-char (setq lspos (match-beginning 0)))
|
(goto-char (setq lspos (match-beginning 0)))
|
||||||
(setq level (org-reduced-level (funcall outline-level))
|
(setq level (org-reduced-level (funcall outline-level))
|
||||||
category (org-get-category))
|
category (org-get-category))
|
||||||
|
|
Loading…
Reference in New Issue