Dmitry Gutov writes: > On 15/11/2023 22:49, Spencer Baugh wrote: >> project--list is the new history variable. Using it is mostly trivial; >> a small bit of work is necessary in project-prompt-project-name to get >> project-names for the history, but that worked out great. Everything >> else just seems to work. >> And with savehist-mode enabled, project--list just gets stored >> automatically without any code in project.el. >> I can implement a backwards-compatible version if this seems like a >> reasonable direction to go in. > > I haven't tried using it, but there's indeed a lot to like about this patch. > > What happens if savehist-mode is nil, though? Which it is by > default. For users with this setup the project history will just > disappear. Indeed. > What kind of backward compatibility did you have in mind? I was thinking about either keeping our code for saving to project-list-file around in some obsoleted form, or using a subset of the savehist code to save only project--list when it's not otherwise enabled. But actually, maybe it's time that we just enable savehist by default. I'll try that first - I mailed emacs-devel about it. Then we could delete our project-list-file code once project.el eventually starts requiring Emacs 30. Regardless, how about the below patch which changes the default behavior to only write project-list-file when Emacs exits? I think this is a useful first step no matter what else we do, since it matches the behavior of savehist better.