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

From: Juri Linkov <[email-masked]>
Date: Tue, 03 Jun 2025 18:23:22 +0300

> Dired+ has long had commands that act on all marked files & dirs
> in a Dired buffer, and all marked files & dirs in Dired buffers
> for marked subdirs,... defined recursively.
>
> IOW, instead of (as in Phil's feature) checking all Dired buffers
> for markings, such functions check only the current Dired buffer,
> Dired buffers for its marked subdirs, and so on recursively.

It would be too tedious to mark subdirs, so it should be sufficient
just to check all subdir Dired buffers.  That would be useful for the
most common case of running this command from the project root dir
that will collect marked files from all project Dired buffers
and show the file names relative to the project root
where the command was run.

> Applying `dired' to that collection of marked files & dirs is
> only one possible action.  In general, all of the usual actions
> for marked files are provided (by separate commands).

When all marked files are collected in one virtual Dired buffer,
then it's easy to perform all other possible actions from this buffer.

> And it would be good to let users optionally name the resulting buffer:
> (defun diredp-marked-files-in-all-buffers (&optional buffer-name)
>   "Dired the files and directories marked in any Dired buffers.
> Like `diredp-marked-files', but for all Dired buffers.
> With a prefix argument you're prompted for the name of the resulting
> Dired buffer.  Otherwise, the name is `MARKED-ANYWHERE'."

This is quite an ugly name, but the name pattern could be defined
by a new variable with a value like "*Dired Marked %s*" where %s
is replaced with the default directory.