GNU bug report logs - #66993
[PATCH] project.el: avoid asking user about project-list-file lock

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Tue, 7 Nov 2023 21:29:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 66993 <at> debbugs.gnu.org
Subject: bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock
Date: Wed, 8 Nov 2023 23:03:43 +0200
On 08/11/2023 17:36, Spencer Baugh wrote:
> Separately: Currently, even without any locking issues, if there are
> multiple Emacsen then project-list-file just contains the project--list
> of the last one to write.  So they're constantly clobbering each others'
> added and removed projects.  If we do the writes more rarely, then we
> could try to read project-list-file first and add or remove the projects
> that were added or removed during the life of this Emacs instance,
> instead of just blindly writing out project--list.  Then if there are
> multiple Emacsen around, their changes to project--list won't clobber
> each other, they'll just be cleanly merged.  Does that sound reasonable?
> 
> Either way, I can implement this.

If you're sure that the added utility is worth the complication in the 
code, why not.

Please post some performance measurements for before/after, though.

E.g. how long project--write-project-list takes without re-reading the 
file, and with the new, merging approach. Though it's probably okay.

BTW, that reminds me of the Fish shell's history merging between 
parallel sessions. I think it was automatic in some version, and now 
it's manual again (https://github.com/fish-shell/fish-shell/issues/825).




This bug report was last modified 1 year and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.