Subject: Re: bug#70593: 30.0.50; Dired: buffers of renamed dirs are broken

From: Michael Heerdegen <[email-masked]>
Date: Thu, 09 May 2024 21:27:14 +0200

Drew Adams via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <[email-masked]> writes:

> `dired-directory' is a buffer-local variable.
> I don't think there's any support for subdir
> listings that are of arbitrary files (i.e., cons
> `dired-directory').  I don't recall, but I think
> that's the case - in which case it shouldn't
> matter that such a list of arbitrary files is
> discarded here.  But it should be checked first.

Not sure whether I can follow.

When I call dired with a cons DIRNAME, `dired-directory' will be bound
to that cons.  And it is consulted for reverting.

When I overwrite it with just `default-directory' and revert, the result
will be a "normal" dired buffer showing this directory - the explicit
listing is lost.

In the scenario of the bug this surely makes a difference.  My latest
patch seems to work as expected.  Any comment about the patch btw?

Subdir insertion in cons value `dired-directory' buffers are not really
supported currently it seems so I took this complication aside for now.
The code does handle the subdir alists, though.

Thanks for your comments so far Drew,

Michael.