branch: externals/consult commit 1e984eb86551fc10c2908103c0f4be0771fe1cf0 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
consult-info: Use progress-reporter when preparing info pages --- consult-info.el | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/consult-info.el b/consult-info.el index cc0fe3122b..3ee3707d23 100644 --- a/consult-info.el +++ b/consult-info.el @@ -137,12 +137,17 @@ (let (buffers) (unwind-protect (progn - (dolist (manual manuals) - (with-current-buffer (generate-new-buffer (format "*info-preview-%s*" manual)) - (let (Info-history Info-history-list Info-history-forward) - (Info-mode) - (Info-find-node manual "Top")) - (push (cons manual (current-buffer)) buffers))) + (let ((reporter (make-progress-reporter "Preparing" 0 (length manuals)))) + (seq-do-indexed (lambda (manual idx) + (push (cons manual (generate-new-buffer (format "*info-preview-%s*" manual))) + buffers) + (with-current-buffer (cdar buffers) + (let (Info-history Info-history-list Info-history-forward) + (Info-mode) + (Info-find-node manual "Top"))) + (progress-reporter-update reporter (1+ idx) manual)) + manuals) + (progress-reporter-done reporter)) (consult--read (consult--dynamic-collection (apply-partially #'consult-info--candidates (reverse buffers)))