Function: verb--request-spec-from-hierarchy
verb--request-spec-from-hierarchy is a natively compiled function
defined in verb.el.
Signature
(verb--request-spec-from-hierarchy &rest SPECS)
Documentation
Return a request spec generated from the headings hierarchy.
To do this, use verb--request-spec-from-heading for the current
heading, for that heading's parent, and so on until the root of the
hierarchy is reached.
Once all the request specs have been collected, override them in
inverse order according to the rules described in
verb-request-spec-override. After that, override that result with
all the request specs in SPECS, in the order they were passed in.
Source Code
;; Defined in /nix/store/8jnfn8w2mxcxbr2crbklcnija9m0zlkq-emacs-packages-deps/share/emacs/site-lisp/elpa/verb-20260818.1921/verb.el
(defun verb--request-spec-from-hierarchy (&rest specs)
"Return a request spec generated from the headings hierarchy.
To do this, use `verb--request-spec-from-heading' for the current
heading, for that heading's parent, and so on until the root of the
hierarchy is reached.
Once all the request specs have been collected, override them in
inverse order according to the rules described in
`verb-request-spec-override'. After that, override that result with
all the request specs in SPECS, in the order they were passed in."
;; Load all prelude verb-var's before rest of the spec to be complete, unless
;; specs already exists which means called from ob-verb block and loaded.
(unless specs
(verb--load-preludes-from-hierarchy))
(let ((p (point))
done final-spec)
(save-restriction
(widen)
(save-excursion
;; First, go back to the current heading, if possible. If no
;; heading is found, then don't attempt to read anything.
(setq done (not (verb--back-to-heading)))
;; If there's at least one heading above us, go up through the
;; headings tree taking a request specification from each level.
(while (not done)
(let ((spec (verb--request-spec-from-heading p)))
(when spec (push spec specs)))
(setq done (not (verb--up-heading))))))
(if specs
(progn
(setq final-spec (car specs))
(when (< 1 (length specs))
(dolist (spec (cdr specs))
;; Override spec 1 with spec 2, and the result with spec
;; 3, then with 4, etc.
(setq final-spec (verb-request-spec-override final-spec
spec))))
;; Process and return.
(verb--request-spec-post-process final-spec))
(user-error (concat "No request specifications found\n"
"Remember to tag your headlines with :%s:")
verb-tag))))