bump: :completion vertico
minad/consult@d30213aa20 -> minad/consult@822928a860 minad/marginalia@dbc37b373e -> minad/marginalia@26f2bd9ee7 minad/vertico@46e8e05650 -> minad/vertico@cc5f5421c6 oantolin/embark@2890e535f5 -> oantolin/embark@d88478b45f oantolin/orderless@8f64537f55 -> oantolin/orderless@75eeae2197 - Remove everything related to `consult-completing-read-multiple` since the function has been deprecated upstream due to implementation issues Ref: minad/consult#567 Close: #6352
This commit is contained in:
parent
8a27eb99be
commit
c13b59395c
4 changed files with 8 additions and 54 deletions
|
@ -206,43 +206,6 @@ targets."
|
||||||
nil nil t (lambda (binding)
|
nil nil t (lambda (binding)
|
||||||
(not (string-suffix-p "-argument" (cdr binding))))))))
|
(not (string-suffix-p "-argument" (cdr binding))))))))
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun +vertico/crm-select ()
|
|
||||||
"Toggle selection of current candidate in `consult-completing-read-multiple'.
|
|
||||||
If the candidate has been selected, move the index up by one, to allow for quick
|
|
||||||
selection of multiple subsequent candidates."
|
|
||||||
(interactive)
|
|
||||||
(let* ((selected-p (get-text-property 0 'consult--crm-selected (vertico--candidate)))
|
|
||||||
(goto-idx (+ vertico--index (if selected-p 0 1))))
|
|
||||||
(run-at-time 0 nil (cmd! (vertico--goto goto-idx) (vertico--exhibit))))
|
|
||||||
(vertico-exit))
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun +vertico/crm-select-keep-input ()
|
|
||||||
"Like `+vertico/crm-select', but keeps the current minibuffer input."
|
|
||||||
(interactive)
|
|
||||||
(let* ((input (substring-no-properties (car vertico--input)))
|
|
||||||
(selected-p (get-text-property 0 'consult--crm-selected (vertico--candidate)))
|
|
||||||
(goto-idx (+ vertico--index (if selected-p 0 1))))
|
|
||||||
(run-at-time 0 nil (cmd! (insert input) (vertico--exhibit) (vertico--goto goto-idx) (vertico--exhibit))))
|
|
||||||
(vertico-exit))
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun +vertico/crm-exit ()
|
|
||||||
"Exit `consult-completing-read-multiple' session in a dwim way.
|
|
||||||
If there are no selected candidates, select the current candidate and exit.
|
|
||||||
If there are selected candidates, disregard the current candidate and exit."
|
|
||||||
(interactive)
|
|
||||||
(if (consult--crm-selected)
|
|
||||||
(progn
|
|
||||||
(when (minibuffer-contents)
|
|
||||||
(delete-minibuffer-contents)
|
|
||||||
(vertico--exhibit))
|
|
||||||
(vertico--goto -1)
|
|
||||||
(vertico-exit))
|
|
||||||
(run-at-time 0 nil #'vertico-exit)
|
|
||||||
(vertico-exit)))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +vertico--consult--fd-builder (input)
|
(defun +vertico--consult--fd-builder (input)
|
||||||
(pcase-let* ((cmd (split-string-and-unquote +vertico-consult-fd-args))
|
(pcase-let* ((cmd (split-string-and-unquote +vertico-consult-fd-args))
|
||||||
|
|
|
@ -101,7 +101,6 @@ orderless."
|
||||||
[remap switch-to-buffer-other-frame] #'consult-buffer-other-frame
|
[remap switch-to-buffer-other-frame] #'consult-buffer-other-frame
|
||||||
[remap yank-pop] #'consult-yank-pop
|
[remap yank-pop] #'consult-yank-pop
|
||||||
[remap persp-switch-to-buffer] #'+vertico/switch-workspace-buffer)
|
[remap persp-switch-to-buffer] #'+vertico/switch-workspace-buffer)
|
||||||
(advice-add #'completing-read-multiple :override #'consult-completing-read-multiple)
|
|
||||||
(advice-add #'multi-occur :override #'consult-multi-occur)
|
(advice-add #'multi-occur :override #'consult-multi-occur)
|
||||||
:config
|
:config
|
||||||
(defadvice! +vertico--consult-recent-file-a (&rest _args)
|
(defadvice! +vertico--consult-recent-file-a (&rest _args)
|
||||||
|
@ -145,11 +144,7 @@ orderless."
|
||||||
:category buffer
|
:category buffer
|
||||||
:state ,#'consult--buffer-state
|
:state ,#'consult--buffer-state
|
||||||
:items ,(lambda () (mapcar #'buffer-name (org-buffer-list)))))
|
:items ,(lambda () (mapcar #'buffer-name (org-buffer-list)))))
|
||||||
(add-to-list 'consult-buffer-sources '+vertico--consult-org-source 'append))
|
(add-to-list 'consult-buffer-sources '+vertico--consult-org-source 'append)))
|
||||||
(map! :map consult-crm-map
|
|
||||||
:desc "Select candidate" [tab] #'+vertico/crm-select
|
|
||||||
:desc "Select candidate and keep input" [backtab] #'+vertico/crm-select-keep-input
|
|
||||||
:desc "Enter candidates" "RET" #'+vertico/crm-exit))
|
|
||||||
|
|
||||||
|
|
||||||
(use-package! consult-dir
|
(use-package! consult-dir
|
||||||
|
|
|
@ -4,19 +4,19 @@
|
||||||
(package! vertico
|
(package! vertico
|
||||||
:recipe (:host github :repo "minad/vertico"
|
:recipe (:host github :repo "minad/vertico"
|
||||||
:files ("*.el" "extensions/*.el"))
|
:files ("*.el" "extensions/*.el"))
|
||||||
:pin "46e8e0565079b7161ada4beb94c8938ee9c04bfb")
|
:pin "cc5f5421c6270b8fdd12265ccdaffc3cd297d0d8")
|
||||||
|
|
||||||
(package! orderless :pin "8f64537f556f26492fe5ee401d8d578d7d88684b")
|
(package! orderless :pin "75eeae21971d86b51a712ed8ecd6434463b2d866")
|
||||||
|
|
||||||
(package! consult :pin "d30213aa209391e03b1c1011df92d91a1fc5ef32")
|
(package! consult :pin "822928a8609730e8c22e068b04d7908312706cfd")
|
||||||
(package! consult-dir :pin "08f543ae6acbfc1ffe579ba1d00a5414012d5c0b")
|
(package! consult-dir :pin "d397ca6ea67af4d3c59a330a778affd825f0efd9")
|
||||||
(when (featurep! :checkers syntax)
|
(when (featurep! :checkers syntax)
|
||||||
(package! consult-flycheck :pin "9b40f136c017fadf6239d7602d16bf73b4ad5198"))
|
(package! consult-flycheck :pin "9b40f136c017fadf6239d7602d16bf73b4ad5198"))
|
||||||
|
|
||||||
(package! embark :pin "2890e535f55b1f08f379fd761b263fa337a72185")
|
(package! embark :pin "d88478b45f2d589339334dc8d40b07bce28aab0e")
|
||||||
(package! embark-consult :pin "2890e535f55b1f08f379fd761b263fa337a72185")
|
(package! embark-consult :pin "d88478b45f2d589339334dc8d40b07bce28aab0e")
|
||||||
|
|
||||||
(package! marginalia :pin "dbc37b373e734269bd75d1763e7309863508bf10")
|
(package! marginalia :pin "26f2bd9ee7b63bcad6604108e2f565b34bc6083b")
|
||||||
|
|
||||||
(package! wgrep :pin "f9687c28bbc2e84f87a479b6ce04407bb97cfb23")
|
(package! wgrep :pin "f9687c28bbc2e84f87a479b6ce04407bb97cfb23")
|
||||||
|
|
||||||
|
|
|
@ -86,10 +86,6 @@ variable accordingly.")
|
||||||
|
|
||||||
(advice-add #'notmuch-start-notmuch-sentinel :around #'+notmuch-dont-confirm-on-kill-process-a)
|
(advice-add #'notmuch-start-notmuch-sentinel :around #'+notmuch-dont-confirm-on-kill-process-a)
|
||||||
|
|
||||||
;;HACK temporary fix until notmuch stops abusing the completing-read-multiple api upstream
|
|
||||||
(when (featurep! :completion vertico)
|
|
||||||
(advice-add #'notmuch-read-tag-changes :filter-return (lambda (x) (mapcar #'string-trim x))))
|
|
||||||
|
|
||||||
;; modeline doesn't have much use in these modes
|
;; modeline doesn't have much use in these modes
|
||||||
(add-hook! '(notmuch-show-mode-hook
|
(add-hook! '(notmuch-show-mode-hook
|
||||||
notmuch-tree-mode-hook
|
notmuch-tree-mode-hook
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue