unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tassilo Horn <tsdh@gnu.org>
Cc: 54636@debbugs.gnu.org, schwab@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	[thread overview]
Message-ID: <83y20r768z.fsf@gnu.org> (raw)
In-Reply-To: <878rsr1kss.fsf@gnu.org> (message from Tassilo Horn on Wed, 30 Mar 2022 18:02:15 +0200)

> From: Tassilo Horn <tsdh@gnu.org>
> Cc: schwab@linux-m68k.org, 54636@debbugs.gnu.org
> Date: Wed, 30 Mar 2022 18:02:15 +0200
> 
> Eli Zaretskii <eliz@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?





  parent reply	other threads:[~2022-03-30 16:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30 11:15 bug#54636: dired fails to update subdirs when files are created/deleted/renamed Andreas Schwab
2022-03-30 12:03 ` Eli Zaretskii
2022-03-30 12:11 ` Andreas Schwab
2022-03-30 12:43   ` Tassilo Horn
2022-03-30 13:22     ` Eli Zaretskii
2022-03-30 13:29       ` Tassilo Horn
2022-03-30 13:56         ` Eli Zaretskii
2022-03-30 14:30           ` Tassilo Horn
2022-03-30 15:51             ` Eli Zaretskii
2022-03-30 16:02               ` Tassilo Horn
2022-03-30 16:29                 ` Tassilo Horn
2022-03-30 16:42                   ` Eli Zaretskii
2022-03-30 16:47                     ` Tassilo Horn
2022-03-30 16:55                       ` Eli Zaretskii
2022-03-30 17:51                         ` Tassilo Horn
2022-04-05 11:30                           ` Eli Zaretskii
2022-03-30 16:30                 ` Eli Zaretskii [this message]
2022-03-30 16:32                   ` Tassilo Horn
2023-07-08 18:31 ` Jakub Ječmínek
2023-07-09 11:09   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83y20r768z.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=54636@debbugs.gnu.org \
    --cc=schwab@linux-m68k.org \
    --cc=tsdh@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).