From 8cc821bda2e400a7705ee304c44bd108139afaf5 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Fri, 16 Sep 2022 12:32:34 +0800 Subject: [PATCH] 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'. --- lisp/org-agenda.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 0532320783..a661f182b3 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -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))