Subject: RE: bug#42605: 28.0.50; File lines in find-dired buffers not updated

From: Drew Adams <[email-masked]>
Date: Wed, 29 Jul 2020 14:53:36 -0700 (PDT)

Hi Michael,

> I run M-x find-dired and get a dired buffer.  When I delete any file in
> that buffer, the file's line is not removed from the buffer.  This is
> sometimes a bit annoying (and not really useful I guess?).  Dunno what
> other kinds of dired buffers and file actions are also affected.
> 
> One aspect of the issue is that `dired-fun-in-all-buffers' and
> `dired-buffers-for-dir', which the former is based on, only consider
> dired buffers in the `dired-buffers' variable, which, AFAICT, doesn't
> include such "non-standard" dired buffers.  I also dunno whether looking
> in the buffer's `dired-subdir-alist' would be sufficient in my case.
> 
> OTOH, when I delete a file in a buffer, dired could be smart enough to
> guess that the current buffer does include the file.

FWIW, I don't understand the last paragraph.  What do
you mean by "delete a file in a buffer"? Do you mean
somehow delete a file (from disk) from a buffer that
is visiting it?  Or delete it from a Dired buffer?
I'm guessing it's the latter, but in that case Dired
does do that, doesn't it?

For the rest, here's something to maybe consider:

`find-dired' gives you a snapshot of what's on disk
at a given time.  Dired does that too, but for Dired
there's an optional behavior of having its display
auto-revert, to pick up any disk changes when you
revisit the Dired buffer.

Is that what you're requesting for `find-dired' too?
If so, should it be turned on by the same option,
`dired-auto-revert-buffer'?  I can think that someone
might well want a different option for it.

I can also think that someone might sometimes want
the current behavior, i.e., s?he would turn off such
a new option.

For example, you might want to have a buffer with
such a `find-dired' snapshot, as reference/comparison,
as you go through and delete or modify some of the
listed files, i.e., to keep track of what you've done
so far.  (But I guess such tracking would kind of be
available anyway, if you sort the `find-dired' output
by time.)