Dmitry Gutov writes: > 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? Oh, good point. > 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. Agreed, done in this patch. I also stopped changing the format of project--list, so the patch is overall simpler and more compatible.