GNU bug report logs - #54636
dired fails to update subdirs when files are created/deleted/renamed

Previous Next

Package: emacs;

Reported by: Andreas Schwab <schwab <at> linux-m68k.org>

Date: Wed, 30 Mar 2022 11:16:02 UTC

Severity: normal

Merged with 51486

Found in version 28.0.60

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: Eli Zaretskii <eliz <at> gnu.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 54636 <at> debbugs.gnu.org, schwab <at> linux-m68k.org
Subject: bug#54636: dired fails to update subdirs when files are created/deleted/renamed
Date: Wed, 30 Mar 2022 19:30:20 +0300
> From: Tassilo Horn <tsdh <at> gnu.org>
> Cc: schwab <at> linux-m68k.org, 54636 <at> debbugs.gnu.org
> Date: Wed, 30 Mar 2022 18:02:15 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > So when will SUBDIRS be non-nil?  dired-clean-up-after-deletion is
> > called not only when a directory is deleted, I think.
> 
> Yes, it's also called when deleting a file but in that case
> dired-buffers-for-dir will return nil, so no buffer will be deleted.

What about moving/renaming a directory?

> I think my patch is valid but now I think I should just create a
> separate function dired-buffers-for-cleanup and use that from
> dired-clean-up-after-deletion (or just collect the buffers in that
> function) and remove the SUBDIRS argument from dired-buffers-for-dir as
> it changes its logic too drastically.
> 
> I'll prepare a patch in that direction later.

At this point, I'd prefer the safest, simplest patch for the release
branch, because I intend to release Emacs 28.1 VSN.  We can make a
cleaner fix on master later.

Do you think this patch you posted is safe enough for Emacs 28.1?




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

Previous Next


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