|
From: | Dmitry Gutov |
Subject: | bug#67310: [PATCH] Include the project--list as history when prompting for a project |
Date: | Wed, 22 Nov 2023 03:40:28 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 21/11/2023 17:17, Spencer Baugh wrote:
(if (equal pr-dir dir-choice) (read-directory-name "Select directory: " default-directory nil t) + (project--add-dir pr-dir) pr-dir))) ... (if (equal pr-name dir-choice) (read-directory-name "Select directory: " default-directory nil t) - (let ((proj (assoc pr-name choices))) - (if (stringp proj) proj (project-root (cdr proj))))))) + (let* ((proj (assoc pr-name choices)) + (root (project-root (cdr proj)))) + (project--add-dir root) + root))))
I think in the (equal pr-dir dir-choice) case we want to add the directory name entered by the user into the "history" anyway, don't we?
Though perhaps there's no need to do it here: 'project-current' calls 'project-remember-project' anyway when maybe-prompt is non-nil.
So what happens if you drop both of the above 'project--add-dir' calls?
[Prev in Thread] | Current Thread | [Next in Thread] |