Subject: Re: bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock

From: Michael Albinus <[email-masked]>
Date: Wed, 08 Nov 2023 08:46:48 +0100

Spencer Baugh <[email-masked]> writes:

Hi Spencer,

> If a user has multiple Emacs instances open using one or more of these
> features, it's fairly easy for both of the Emacs instances to see a
> new project at the same time.  In that case, they'll both call
> project--write-project-list at the same time, which will clash and run
> ask-user-about-lock.  This will happen frequently if the user is often
> looking at new projects.
>
> There's no correct answer the user can give to ask-user-about-lock:
> either way, one of the Emacs instances will have its project-list-file
> update lost.  So let's not even bother prompting the user: just do
> nothing if project-list-file is currently locked.

If you don't care about locking project-list-file, let-bind
create-lockfiles to nil while writing project-list-file.

Best regards, Michael.