GNU bug report logs - #78658
30.1; [PATCH] Dired feature suggestion: dired-on-marked-files-in-all-buffers

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Sun, 1 Jun 2025 03:20:06 UTC

Severity: normal

Tags: patch

Found in version 30.1

Full log


Message #95 received at 78658 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: "rms <at> santafe.edu" <rms <at> gnu.org>,
 "78658 <at> debbugs.gnu.org" <78658 <at> debbugs.gnu.org>, Juri Linkov <juri <at> linkov.net>,
 Stefan Kangas <stefankangas <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>,
 Andrea Corallo <acorallo <at> gnu.org>
Subject: RE: [External] : bug#78658: 30.1; [PATCH] Dired feature suggestion:
 dired-on-marked-files-in-all-buffers
Date: Thu, 5 Jun 2025 16:18:34 +0000
+Eli, Stefan K, Andrea, and RMS, for the find* Dired buffers
question (variable `dired-buffers').
_____

> > _Should_ they be excluded from `dired-buffers'?  Maybe so, maybe not.
> > They support most Dired features, and their mode is `dired-mode', but
> > there are perhaps a few Dired features they don't support (dunno what,
> > offhand - they support WDired and everything else that occurs to me
> > offhand).  (I wish their code included a comment as to _why_ they have
> > that binding.)
> 
> The following seems to be the best there is, which doesn't help
> beyond confirming that it's intentional (which was already clear
> from the binding itself).
> 
> commit 0322a154b764f8358ba8913dc6fc724ba9f4294d
> Author: Richard M. Stallman <rms <at> gnu.org>
> Date:   Sat Jun 27 21:59:11 1998 +0000
>      (find-dired): Bind dired-buffers so it can't change.  Use
> abbreviate-file-name.
>
> The symbol doesn't crop up in too many places:

Yes, as I said, only find-dired.el and find-lisp.el.

> So auditing the associated behaviours might be an option,
> to see if some reason for it becomes apparent.

Dunno how to audit such a thing.

> Offhand it seems odd to me.

Yes.

My guess is that it was done only as a precaution, not
knowing what eventual differences might be introduced
between "regular" Dired buffers and the find* ones.

A Dired buffer with cons DIRNAME (i.e., an arbitrary set
of files, not the result of something like `ls') has
similar differences (limitations) wrt "regular" Dired
buffers, and such buffers are included in `dired-buffers'.
To me, the find* Dired buffers are pretty much akin to the
arbitrary-files Dired buffers.

But I may be missing something.  Is there a Dired expert
in the house?  Or someone with memory of this?  Or some
way to check non-vanilla code in the wild, to see if this
really matters for find* buffers?
____

Maybe Eli, Stefan K., Andrea, or RMS has a suggestion.
The question is whether we can reasonably remove this
binding from the find-dired.el and find-lisp.el code:

  (let ((dired-buffers dired-buffers))...)

IOW, is there a good reason to preclude find* Dired
buffers from the value of `dired-buffers'?

The advantage of not excluding them is that when looking
for Dired buffers we don't need to filter the entire
`buffer-list'; we can just use `dired-buffers' as the
search space.

Note: `dired-buffers' are buffers with mode derived from
`dired-mode'.  The list is filled by `dired-advertise'
and reduced by `dired-unadvertise'.  It doesn't include
`wdired-mode' buffers, for example, because WDired uses
`dired-unadvertise'.




This bug report was last modified 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.