org-agenda-get-sexps: Query headline at point once in skip function

* lisp/org-agenda.el (org-agenda-get-sexps): Provide headline at point
for `org-agenda-skip'.
This commit is contained in:
Ihor Radchenko 2022-09-16 12:32:34 +08:00
parent 1de67d0b41
commit 8cc821bda2
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -5908,7 +5908,7 @@ displayed in agenda view."
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(catch :skip
(org-agenda-skip)
(org-agenda-skip (org-element-lineage (org-element-at-point) '(headline inlinetask) 'with-self))
(setq beg (match-beginning 0))
(goto-char (1- (match-end 0)))
(setq b (point))