Subject: bug#67310: [PATCH] Include the project--list as history when prompting for a project

From: Dmitry Gutov <[email-masked]>
Date: Tue, 21 Nov 2023 13:14:29 +0200

On 21/11/2023 13:06, Dmitry Gutov wrote:
> On 20/11/2023 21:58, Spencer Baugh wrote:
>> +              (completing-read "Select project: " choices nil t nil 
>> 'project--list))))
> 
> I wonder if this will make 'project--list' to be automatically managed 
> my savehist-mode (because of what savehist-minibuffer-hook does).
> 
> And then the contents of this var might be restored by savehist-mode 
> (when enabled) at a time or in a way that project.el is not expecting.

Sorry, I sent this by accident, it was in drafts.

You explained this in the patch's message. But could there be a way that 
the list of overwritten anyway? Like when the user enables savehist-mode 
mid-session (or simply after project--list is used for the first time), 
and savehist-mode reads the histories from a saved file, overwriting the 
current session's values?

Perhaps it would be more reliable to have separate history variables 
(one for directory names, and one for project names), and construct 
their values dynamically before reading the project.