[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/project-switching-x 8d6b841 2/5: Improve project name completion
From: |
Dmitry Gutov |
Subject: |
scratch/project-switching-x 8d6b841 2/5: Improve project name completion |
Date: |
Mon, 11 May 2020 21:21:03 -0400 (EDT) |
branch: scratch/project-switching-x
commit 8d6b84159cbc7380bb7c7670a7b911c3b826fbf5
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Improve project name completion
* lisp/progmodes/project.el:
(project-prompt-project-dir): Use REQUIRE-MATCH=t. Make sure the
'substring' completion style is used by default.
---
lisp/progmodes/project.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 08eb774..b5e7414 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -698,8 +698,12 @@ The project is chosen among projects known from the
project list.
It's also possible to enter an arbitrary directory."
(project--ensure-read-project-list)
(let* ((dir-choice "... (choose a dir)")
- (choices (append project--list `(,dir-choice)))
- (pr-dir (completing-read "Project: " choices)))
+ (choices
+ ;; XXX: Just using this for the category (for the substring
+ ;; completion style).
+ (project--file-completion-table
+ (append project--list `(,dir-choice))))
+ (pr-dir (completing-read "Project: " choices nil t)))
(if (equal pr-dir dir-choice)
(read-directory-name "Choose directory: " default-directory nil t)
pr-dir)))
- branch scratch/project-switching-x created (now 90a749b), Dmitry Gutov, 2020/05/11
- scratch/project-switching-x d98038e 1/5: Simplify a little, and avoid duplicate commands, Dmitry Gutov, 2020/05/11
- scratch/project-switching-x 9cfc9c9 4/5: Move project-dired and project-eshell higher, Dmitry Gutov, 2020/05/11
- scratch/project-switching-x 8d6b841 2/5: Improve project name completion,
Dmitry Gutov <=
- scratch/project-switching-x 90a749b 5/5: Integrate project-switch-project with project-find-regexp, Dmitry Gutov, 2020/05/11
- scratch/project-switching-x ac837ee 3/5: Use an alist instead of a keymap, Dmitry Gutov, 2020/05/11