bug#81295: 32.0.50; dired-auto-toggle-b-switch problem with subdirectory
Filipp Gunbin <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Organization | https://plainsoftware.org |
| Message-ID | <[email protected]> |
On 28/07/2026 11:51 +0200, Stephen Berman wrote: [...] >> I still think I'm opposed to the fix, because 1) it surely will >> introduce more subtle bugs (I think I can come up with the cases >> easily), > > Are you referring just to the change that skips validation or to the > entire change to dired-aux.el? If the former, and you demonstrate that > it introduces bugs at least as serious as the one it fixes, then I > certainly have no objection to omitting that part of the patch. Only to the latest patch which circumvents validation. I tried to explain why I think it's problematic, and see no need for a concrete recipe - I think it's clear that the change breaks logic, so finding a way to exploit it is just a waste of time. If you think that it still needs to be installed, and maintainers agree, then I certainly too. >> 2) it will be harder to clean up later. A FIXME is IMO better >> for now, given that we don't have bug reports on this other than mine. >> >> I'll try to come up with an implementation of what I proposed, but >> later. > > When you wrote above "perhaps we better leave this unfixed for now. > You've fixed my original complaint in this bug, this is already an > improvement.", it seemed clear you were referring just to the problem I > "fixed" by skipping validation. But your proposal to add more > buffer-local variables would AFAIU also entail different changes than > the rest of what my patch for dired-aux.el contains; but without those > changes, newlines in filenames in Dired subdirs would be left unhandled, > and the change to `dired--filename-with-newline-p' would be useless. The "original complaint" (the one I created the bug about) was about inserting a subdir with i - this is fixed. The latest problem in this thread is about doing it with custom switches - that's the one which I'm suggesting to omit for now. My suggestions for next improvements involve adding more state, because, as I wrote above, currently we lose information about user's custom switches when modifying "actual switches". I don't see how that makes your changes irrelevant. > It's not clear to me how to proceed at this point, so I'm asking the > maintainers for their opinion and will defer to that. AFAIU the choice > is between my patch for handling newlines in filenames in Dired subdirs, > either including the case of `C-u i' (attached patch 1) or leaving this > case unfixed for now (attached patch 2), or waiting for your alternative > implementation for handling newlines in filenames in Dired subdirs. Your patch #2 is fine to me. I was only opposed to skipping validation in patch #1, this part: - (and (not switches) cons (setq switches (cdr cons))) + ;; If `dired-actual-switches' now includes "-b" due to + ;; `dired--toggle-b-switch', we don't want to override this by + ;; passing incompatible switches via `C-u i', so we skip validation + ;; in this case. FIXME: Is there a better way? See bug#81295. + (and (not switches) (not (dired-switches-escape-p dired-actual-switches)) + cons (setq switches (cdr cons)))