Add: (heading) Alias "h"

This commit is contained in:
Adam Porter 2019-10-19 02:10:04 -05:00
parent 7d321630a0
commit 0d6523f85b
2 changed files with 8 additions and 1 deletions

View file

@ -569,6 +569,11 @@ Replaces bare strings with (regexp) selectors, and appropriate
(ts-apply :hour 23 :minute 59 :second 59))))
`(,pred :to ,to)))
;; Headings.
(`(h . ,args)
;; "h" alias.
`(heading ,@args))
;; Outline paths.
(`(,(or 'outline-path 'olp) . ,strings)
;; Regexp quote headings.
@ -1132,7 +1137,7 @@ priority B)."
always (save-excursion
(re-search-forward regexp end t))))))
(org-ql--defpred heading (&rest regexps)
(org-ql--defpred (heading h) (&rest regexps)
"Return non-nil if current entry's heading matches all REGEXPS (regexp strings)."
;; TODO: In Org 9.2+, `org-get-heading' takes 2 more arguments.
(let ((heading (org-get-heading 'no-tags 'no-todo)))