Merge 56c93ab8c8 into 4b8330a683
This commit is contained in:
commit
bc11236b87
1 changed files with 20 additions and 20 deletions
|
|
@ -332,26 +332,26 @@ single predicate)."
|
||||||
;; ensuring all of the BUFFERS-FILES are loaded and initialized before calling
|
;; ensuring all of the BUFFERS-FILES are loaded and initialized before calling
|
||||||
;; `completing-read'.
|
;; `completing-read'.
|
||||||
(mapc #'org-ql--ensure-buffer buffers-files)
|
(mapc #'org-ql--ensure-buffer buffers-files)
|
||||||
(let* ((completion-styles '(org-ql-completing-read))
|
(let ((selected
|
||||||
(completion-styles-alist (cons (list 'org-ql-completing-read #'try #'all "Org QL Find")
|
(minibuffer-with-setup-hook
|
||||||
completion-styles-alist))
|
(lambda ()
|
||||||
(selected
|
(setq-local completion-styles '(org-ql-completing-read))
|
||||||
(minibuffer-with-setup-hook
|
(setq-local completion-styles-alist (cons (list 'org-ql-completing-read #'try #'all "Org QL Find")
|
||||||
(lambda ()
|
completion-styles-alist))
|
||||||
(use-local-map (make-composed-keymap org-ql-completing-read-map (current-local-map))))
|
(use-local-map (make-composed-keymap org-ql-completing-read-map (current-local-map))))
|
||||||
(cl-letf* (((symbol-function 'org-ql-completing-read-export)
|
(cl-letf* (((symbol-function 'org-ql-completing-read-export)
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(run-at-time 0 nil
|
(run-at-time 0 nil
|
||||||
#'org-ql-search
|
#'org-ql-search
|
||||||
buffers-files
|
buffers-files
|
||||||
(minibuffer-contents-no-properties))
|
(minibuffer-contents-no-properties))
|
||||||
(if (fboundp 'minibuffer-quit-recursive-edit)
|
(if (fboundp 'minibuffer-quit-recursive-edit)
|
||||||
(minibuffer-quit-recursive-edit)
|
(minibuffer-quit-recursive-edit)
|
||||||
(abort-recursive-edit))))
|
(abort-recursive-edit))))
|
||||||
((symbol-function 'embark-export)
|
((symbol-function 'embark-export)
|
||||||
(symbol-function 'org-ql-completing-read-export)))
|
(symbol-function 'org-ql-completing-read-export)))
|
||||||
(completing-read prompt #'collection nil t)))))
|
(completing-read prompt #'collection nil t)))))
|
||||||
;; (debug-message "SELECTED:%S KEYS:%S" selected (hash-table-keys table))
|
;; (debug-message "SELECTED:%S KEYS:%S" selected (hash-table-keys table))
|
||||||
(or (gethash selected table)
|
(or (gethash selected table)
|
||||||
;; If there are completions in the table, but none of them exactly match the user input
|
;; If there are completions in the table, but none of them exactly match the user input
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue