Function: hyrolo-map-logic
hyrolo-map-logic is a byte-compiled function defined in
hyrolo-logic.el.
Signature
(hyrolo-map-logic SEXP HYROLO-BUF &optional COUNT-ONLY INCLUDE-SUB-ENTRIES NO-SUB-ENTRIES-OUT KOUTLINE-FLAG)
Documentation
Apply logical SEXP to each entry in HYROLO-BUF.
Write out matching entries to hyrolo-display-buffer. If
optional COUNT-ONLY is non-nil, don't display entries, return
count of matching entries only. If optional INCLUDE-SUB-ENTRIES
flag is non-nil, apply SEXP across all sub-entries at once.
Default is to apply SEXP to each entry and sub-entry separately.
Entries are displayed with all of their sub-entries unless
INCLUDE-SUB-ENTRIES is nil and optional _NO-SUB-ENTRIES-OUT flag
is non-nil. With optional KOUTLINE-FLAG, map entries with
hyrolo-map-kotl rather than hyrolo-map-entries.
SEXP should utilize the free variables start and end as the
region on which to operate.
Return the number of evaluations of SEXP that match entries.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hyrolo-logic.el
(defun hyrolo-map-logic (sexp hyrolo-buf &optional count-only
include-sub-entries _no-sub-entries-out
koutline-flag)
"Apply logical SEXP to each entry in HYROLO-BUF.
Write out matching entries to `hyrolo-display-buffer'. If
optional COUNT-ONLY is non-nil, don't display entries, return
count of matching entries only. If optional INCLUDE-SUB-ENTRIES
flag is non-nil, apply SEXP across all sub-entries at once.
Default is to apply SEXP to each entry and sub-entry separately.
Entries are displayed with all of their sub-entries unless
INCLUDE-SUB-ENTRIES is nil and optional _NO-SUB-ENTRIES-OUT flag
is non-nil. With optional KOUTLINE-FLAG, map entries with
`hyrolo-map-kotl' rather than `hyrolo-map-entries'.
SEXP should utilize the free variables `start' and `end' as the
region on which to operate.
Return the number of evaluations of SEXP that match entries."
(setq hyrolo-buf (or (get-buffer hyrolo-buf) hyrolo-buf))
(if (or (bufferp hyrolo-buf)
(when (file-exists-p hyrolo-buf)
(setq hyrolo-buf (find-file-noselect hyrolo-buf t))))
(let ((display-buf (hyrolo-set-display-buffer))
(hdr-pos)
(num-found 0))
(set-buffer hyrolo-buf)
(save-excursion
(save-restriction
(hyrolo-widen)
(goto-char (point-min))
;; Ensure no entries in outline mode are hidden.
(outline-show-all)
(when (re-search-forward hyrolo-hdr-regexp nil t 2)
(forward-line)
(setq hdr-pos (cons (point-min) (point))))
(setq num-found (if koutline-flag
(hyrolo-map-kotl
sexp hyrolo-buf display-buf hdr-pos count-only include-sub-entries)
(hyrolo-map-entries
sexp hyrolo-buf display-buf hdr-pos count-only include-sub-entries)))))
(hyrolo-kill-buffer hyrolo-buf)
num-found)
0))