branch: externals/hyperbole commit 0dd5a272a353927bab15da81b979a9b8f5d3f824 Author: bw <r...@gnu.org> Commit: bw <r...@gnu.org>
hyrolo-update-file-list - Add to force update to expanded file list Need to call this after files are added or removed from a path in `hyrolo-file-list'. --- ChangeLog | 3 +++ hyrolo.el | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c6e45ab38c..08a3ca7b6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2025-06-15 Bob Weiner <r...@gnu.org> +* hyrolo.el (hyrolo-update-file-list): Add to update 'hyrolo-file-list' + and the cached, fully expanded 'hyrolo--expanded-file-list'. + * hyrolo.el (hyrolo-helm-org-rifle, hyrolo-helm-org-rifle-directory, hyrolo-helm-org-rifle-directories): Remove all 'helm-org-rifle' support from HyRolo in favor of 'consult', the much more widely used diff --git a/hyrolo.el b/hyrolo.el index 8f1e157943..b0ccd0fdb0 100644 --- a/hyrolo.el +++ b/hyrolo.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 7-Jun-89 at 22:08:29 -;; Last-Mod: 15-Jun-25 at 22:36:53 by Bob Weiner +;; Last-Mod: 15-Jun-25 at 23:20:28 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -2866,6 +2866,12 @@ entire subtree. Return INCLUDE-SUB-ENTRIES flag value." (when (called-interactively-p 'interactive) (message "No previous file/buffer location") (beep))))) +(defun hyrolo-update-file-list (&optional path-list) + "Update cached HyRolo file list. +Optionally, also set `hyrolo-file-list' to PATH-LIST when non-nil." + (interactive) + (hyrolo-set-file-list 'hyrolo-file-list (or path-list hyrolo-file-list))) + ;;; ************************************************************************ ;;; Private functions ;;; ************************************************************************ @@ -3796,7 +3802,7 @@ Used in the *HyRolo* display match buffer." ;;; ************************************************************************ (when (and hyrolo-file-list (null hyrolo--expanded-file-list)) - (hyrolo-set-file-list 'hyrolo-file-list hyrolo-file-list)) + (hyrolo-update-file-list)) (provide 'hyrolo)