Set completion-styles via setq-local rather than by let-binding

When the completion-styles are bound they affect all recursive
minibuffers as well, overriding the user's completion setup! Using
setq-local instead ensures the org-ql completion settings are only
applied for the org-ql-completing-read minibuffer.
This commit is contained in:
Omar Antolín 2026-05-31 23:07:28 -06:00
parent 4b8330a683
commit 56c93ab8c8

View file

@ -332,12 +332,12 @@ single predicate)."
;; ensuring all of the BUFFERS-FILES are loaded and initialized before calling
;; `completing-read'.
(mapc #'org-ql--ensure-buffer buffers-files)
(let* ((completion-styles '(org-ql-completing-read))
(completion-styles-alist (cons (list 'org-ql-completing-read #'try #'all "Org QL Find")
completion-styles-alist))
(selected
(let ((selected
(minibuffer-with-setup-hook
(lambda ()
(setq-local completion-styles '(org-ql-completing-read))
(setq-local completion-styles-alist (cons (list 'org-ql-completing-read #'try #'all "Org QL Find")
completion-styles-alist))
(use-local-map (make-composed-keymap org-ql-completing-read-map (current-local-map))))
(cl-letf* (((symbol-function 'org-ql-completing-read-export)
(lambda ()