lisp/org.el: Match COMMENT in `org-complex-heading-regexp-format'

* lisp/org.el (org-set-regexps-and-options): Change
`org-complex-heading-regexp-format' initialization so that the regexp
it produces also matches a headline if it is commented.

TINYCHANGE
This commit is contained in:
Ignacio 2022-05-06 13:51:14 +02:00 committed by Ihor Radchenko
parent 06d08e6f30
commit a3d9999d28
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 4 additions and 1 deletions

View File

@ -3846,7 +3846,8 @@ expected to be bound to nil when matching against this regexp.")
"Printf format to make regexp to match an exact headline.
This regexp will match the headline of any node which has the
exact headline text that is put into the format, but may have any
TODO state, priority and tags.")
TODO state, priority, tags, statistics cookies (at the beginning
or end of the headline title), or COMMENT keyword.")
(defvar-local org-todo-line-tags-regexp nil
"Matches a headline and puts TODO state into group 2 if present.
@ -4213,6 +4214,8 @@ related expressions."
"\\(?: +" org-todo-regexp "\\)?"
"\\(?: +\\(\\[#.\\]\\)\\)?"
"\\(?: +"
;; Headline might be commented
"\\(?:" org-comment-string " +\\)?"
;; Stats cookies can be stuck to body.
"\\(?:\\[[0-9%%/]+\\] *\\)*"
"\\(%s\\)"