bug#81295: 32.0.50; dired-auto-toggle-b-switch problem with subdirectory

Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
On Wed, 29 Jul 2026 15:36:51 +0300 Eli Zaretskii <[email protected]> wrote:

>> From: Stephen Berman <[email protected]>
>> Cc: Filipp Gunbin <[email protected]>,  [email protected],  Eli
>>  Zaretskii <[email protected]>
>> Date: Wed, 29 Jul 2026 13:49:09 +0200
>> 
>> On Tue, 28 Jul 2026 13:19:56 +0100 Sean Whitton <[email protected]> wrote:
>> 
>> > Stephen Berman [28/Jul 11:51am +02] wrote:
>> >> TL;DR for Eli and Sean: Should one of the attached patches for this
>> >> bug be installed in master now, or should we wait for Filipp's
>> >> alternative fix?  (Read on for more context.)
>> >
>> > It looks like you are still discussing, why would there be a need to
>> > install something quickly?
>> 
>> The discussion seems to have reached an impasse.
>
> If there's something that you want Sean and myself to make a decision
> about, would you mind spelling that out?  I'm afraid that I don't
> understand which part(s) of the discussion require our decisions.

Here's a high-level summary (as I understand it, but if Filipp thinks
I've missed or misrepresented anything, I'm sure he'll chime in):

- First Filipp opened this bug to report that the handling in Dired of
  file names that containing a newline did not work with Dired subdirs.
  
- Through an iterative process of me posting patches and Filipp finding
  further problems a point was reached where the handling in subdirs was
  as good as in simple Dired buffers.

- But then Filipp found another problem: in a Dired buffer that lists no
  file names containing a newline and also lists a directory entry, and
  that directory does have a file whose name contains a newline, typing
  `C-u i RET' on that directory (where the prefix argument allows adding
  switches for displaying the subdir, but RET means just the default
  switches -al are used) results in the subdir not being displayed in
  the Dired buffer.

- I came up with a fix, so that the subdir was properly displayed, but
  Filipp objected to the fix because it in effect makes the function
  `dired-insert-subdir-validate' a no-op in the situation leading to the
  bug.  The details are important for understanding the substance of the
  objection, but I don't understand them well enough to give a useful
  summary here (that's part of the current impasse); maybe Filipp can,
  since he has an idea for a better solution, but doesn't have time to
  implement it now.

So that's the current situation, and why I've turned to you and Sean for
a decision on how to proceed: (i) install my changes to handle file
names with newlines in Dired subdirs, including the change that "fixes"
the bug with `C-u i'; (ii) install the changes except for the one that
"fixes" the `C-u i' bug, thus leaving that unfixed for now; (iii) wait
for Filipp's alternative implementation, which will hopefully fix that
bug without circumventing validation of subdir switches.

My preference is (i), for the reasons I gave in my latest response to
Filipp, repeated here: "It's not clear to me that if any bugs result
from this change, they will be worse than the bug that the change fixes.
It's also not clear to me why including this change along with the other
changes now and later, if it is shown to cause other bugs, changing or
replacing it, is worse than omitting the change and leaving a known bug
unfixed for the time being.  But again, I'm fine with whatever the
maintainers decide."

Steve Berman
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.