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:
Itai Y. Efrat 2022-05-07 10:00:04 +03:00
parent 8a27eb99be
commit c13b59395c
4 changed files with 8 additions and 54 deletions

View file

@ -206,43 +206,6 @@ targets."
nil nil t (lambda (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
(defun +vertico--consult--fd-builder (input)
(pcase-let* ((cmd (split-string-and-unquote +vertico-consult-fd-args))

View file

@ -101,7 +101,6 @@ orderless."
[remap switch-to-buffer-other-frame] #'consult-buffer-other-frame
[remap yank-pop] #'consult-yank-pop
[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)
:config
(defadvice! +vertico--consult-recent-file-a (&rest _args)
@ -145,11 +144,7 @@ orderless."
:category buffer
:state ,#'consult--buffer-state
:items ,(lambda () (mapcar #'buffer-name (org-buffer-list)))))
(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))
(add-to-list 'consult-buffer-sources '+vertico--consult-org-source 'append)))
(use-package! consult-dir

View file

@ -4,19 +4,19 @@
(package! vertico
:recipe (:host github :repo "minad/vertico"
:files ("*.el" "extensions/*.el"))
:pin "46e8e0565079b7161ada4beb94c8938ee9c04bfb")
:pin "cc5f5421c6270b8fdd12265ccdaffc3cd297d0d8")
(package! orderless :pin "8f64537f556f26492fe5ee401d8d578d7d88684b")
(package! orderless :pin "75eeae21971d86b51a712ed8ecd6434463b2d866")
(package! consult :pin "d30213aa209391e03b1c1011df92d91a1fc5ef32")
(package! consult-dir :pin "08f543ae6acbfc1ffe579ba1d00a5414012d5c0b")
(package! consult :pin "822928a8609730e8c22e068b04d7908312706cfd")
(package! consult-dir :pin "d397ca6ea67af4d3c59a330a778affd825f0efd9")
(when (featurep! :checkers syntax)
(package! consult-flycheck :pin "9b40f136c017fadf6239d7602d16bf73b4ad5198"))
(package! embark :pin "2890e535f55b1f08f379fd761b263fa337a72185")
(package! embark-consult :pin "2890e535f55b1f08f379fd761b263fa337a72185")
(package! embark :pin "d88478b45f2d589339334dc8d40b07bce28aab0e")
(package! embark-consult :pin "d88478b45f2d589339334dc8d40b07bce28aab0e")
(package! marginalia :pin "dbc37b373e734269bd75d1763e7309863508bf10")
(package! marginalia :pin "26f2bd9ee7b63bcad6604108e2f565b34bc6083b")
(package! wgrep :pin "f9687c28bbc2e84f87a479b6ce04407bb97cfb23")