GNU bug report logs -
#77566
[PATCH] Add option for automatically delete non-existent projects.
Previous Next
Full log
Message #47 received at 77566 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Dmitry Gutov <dmitry <at> gutov.dev> writes:
> On 07/04/2025 03:39, Elijah Gabe Pérez wrote:
> > +(defcustom project-prune-zombie-projects nil
> > + "Automatically remove from project list projects that were deleted.
> > +If set to `all', remove projects when project list file
> > +is being read or written.
> > +If set to `list-read', only remove projects when project list file
> > +is being read.
> > +If set to `list-write', only remove projects when project list file is
> > +being written.
>
> That's a lot of alternatives. Do we have a picture of the users who
> would use each of the values?
>
AFAIK, no, I would honestly prefer just a booelan, this can be confused.
And speaking of remote projects, maybe we should add a prefix argument
> to project-forget-zombie-projects instead of an option.
>
The patch already provides this, should the option be removed?:
@@ -2117,12 +2148,17 @@ project-remember-projects-under
count) count))
count))
-(defun project-forget-zombie-projects ()
- "Forget all known projects that don't exist any more."
- (interactive)
+(defun project-forget-zombie-projects (&optional no-remote no-message)
+ "Forget all known projects that don't exist any more.
+If NO-REMOTE is non-nil, don't forget remote projects.
+If NO-MESSAGE is non-nil, don't display a message about projects removed."
+ (interactive "P")
(dolist (proj (project-known-project-roots))
- (unless (file-exists-p proj)
- (project-forget-project proj))))
+ (unless (or (and no-remote (file-exists-p proj) (not (file-remote-p
proj)))
+ (and project-dont-prune-remote-zombie-projects
+ (file-exists-p proj) (not (file-remote-p proj)))
+ (file-exists-p proj))
+ (project-forget-project proj no-message))))
>
[Message part 2 (text/html, inline)]
This bug report was last modified 66 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.