branch: externals/consult commit 98baed11ef55146dace07abbba4388c40a8023aa Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Revert "consult--directory-prompt: Don't use initial input" This reverts commit ec93a8a787bc0420838e4f201a996958fa3b9557. --- CHANGELOG.org | 2 -- consult.el | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index 0972a652e6..311dbfbba6 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -5,8 +5,6 @@ * Development - ~consult--source-buffer-register~: New source for buffer registers. -- ~consult--directory-prompt~: Use current directory as default, no initial input - such that multiple files or directories can be selected more easily. - ~consult-compile-error~: Add prefix argument to jump to error message in the compilation buffer instead of error location. diff --git a/consult.el b/consult.el index d97bc2884f..dba6b46f90 100644 --- a/consult.el +++ b/consult.el @@ -830,6 +830,7 @@ asked for the directories or files to search via ;; Preserve this-command across `completing-read-multiple' call, ;; such that `consult-customize' continues to work. (let ((this-command this-command) + (def (abbreviate-file-name default-directory)) ;; bug#75910: category instead of `minibuffer-completing-file-name' (minibuffer-completing-file-name t) (ignore-case read-file-name-completion-ignore-case)) @@ -837,9 +838,9 @@ asked for the directories or files to search via (lambda () (setq-local completion-ignore-case ignore-case) (set-syntax-table minibuffer-local-filename-syntax)) - (completing-read-multiple (format-prompt "Dirs or files" "./") + (completing-read-multiple "Directories or files: " #'completion-file-name-table - nil t nil 'consult--path-history "")))) + nil t def 'consult--path-history def)))) ((and `(,p) (guard (file-directory-p p))) p) (ps (setq paths (mapcar (lambda (p) (file-relative-name (expand-file-name p)))