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


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: Phil Sainty <psainty <at> orcon.net.nz>, "78658 <at> debbugs.gnu.org" <78658 <at> debbugs.gnu.org>
Subject: bug#78658: 30.1; [PATCH] Dired feature suggestion: dired-on-marked-files-in-all-buffers
Date: Wed, 4 Jun 2025 20:17:48 +0000
> > Sounds like we're miscommunicating.  You're now talking about
> > `dired-on-marked-files', by which I guess you mean Phil's
> > `dired-on-marked-files-in-all-buffers'.  That doesn't require
> > any marking of subdirs.
> 
> Yes, I removed the name suffix, but now realized a better name
> for the above logic would be `dired-on-marked-files-in-subdirs'.

"in-subdirs" isn't right, IMO, because it's about marked files in
_any_ Dired buffers - nothing to do with subdirs of any particular
directory.

I think a better name is what I'm using in Dired+,
`diredp-marked-in-any-buffers' (but without the `p').

[I use "any", not "all", because "all" might be misinterpreted as
a requirement to be present in all buffers (AND, not OR).  And I
don't include "files" because it's about marked files and dirs
(it's actually about marked lines).  You can, for example, mark
only directory lines, and then perform an action on those dirs.]

> Maybe I misunderstood your description, but I thought that
> with the above use case, to be able to include lisp/vc/vc-dir.el
> to the composite Dired bufer, you require also marking
> the subdir 'lisp', and then also marking the subdir 'vc',
> that requires too much extra effort from the user.

The Dired+ feature I described is about selectively choosing
descendant dirs whose marked files you want to act on.  Just
as you choose the files, so you choose the dirs.  Markings
are selective.

That selectivity is a feature, not a bug.  So it makes no
sense to say that what you really want is to act on all marked
files in _all_ descendant dirs, and that that's the "most
common case", and it's too cumbersome to mark all descendant
dirs.

If that's your use case, you can write a simple command to do it,
or use `diredp-mark-directories-recursive' (`M-+ * /') with a
negative prefix arg, which tells it to ignore subdir markings
and act on _all_ subdirs, recursively.  I.e., `M-- M-+ * /'.

(All `*-recursive' commands are on prefix key `M-+'.  The rest
of the key is `* /', the same non-recursive, vanilla command
`diredp-mark-directories'.  Similarly, `M-+ M-DEL' to remove
all markings recursively.)

Again though, is that also your most common case for insertion
of subdirs in a Dired buffer?  Do you always or often do that:
insert all descendant dirs into a Dired buffer?  I may never
have done that.  In any case, it's far from the "most common
case" for users in general, IMO.  The same goes for acting on
descendant dirs whose listings are in separate Dired buffers,
IMO.




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.