diredp-toggle-find-file-reuse-dir
does not prevent you from opening multiple Dired buffers for different directories (e.g. subdirs). It should be irrelevant here, but you might want to describe just what you are doing, step by step.
With multiple Dired buffers open, you can mark files (and subdirs) in any of them. with Dired+ (which you are apparently using), you can use M-+ C
in a parent directory's Dired buffer to copy all of the files that are marked in that buffer and all of the files that are marked in any of its marked subdirs, with this rule applying recursively.
As an alternative to #2, you can of course also include subdirs in the same Dired buffer, using i
. Then act on (e.g. C
to copy) all files marked in the buffer.
Your problem of losing marks happens because you are using RET
or C-x C-f
to move to another directory. Use C-x d
instead, and you do not lose the previous Dired buffer. Or just use C-M-S-r
to toggle diredp-toggle-find-file-reuse-dir
and turn off reusing temporarily.
FWIW, I don't tell Dired+ to automatically reuse Dired buffers when I hit RET
. Instead, I use C-x C-v
whenever I want to change to a different directory and I don't care to save the current Dired buffer. My fingers decide whether to keep or toss the current Dired buffer when I visit another one: RET
to keep, C-x C-v
to toss. (And I don't worry about having lots of buffers, in general.)
IOW, this comes under the heading of "If it hurts, don't do it." If you purposely kill a Dired buffer, which is what "reusing" means here, then, well, the buffer no longer exists. If it no longer exists then its markings etc. are gone too.
In sum, reuse when you want, and don't reuse when you want. Both behaviors are available at all times. If you start marking things, then think before you use RET
to change directories - use C-x d
or C-x 4 d
instead. It's probably just a question of habit. And don't forget that you have i
too.
ztree-mode
github.com/fourier/ztree and turned it into a file manager with marking capabilities, breaking some of the original functionality and leaving those broken pieces where they lay -- the new monster draws upon various customized functions taken fromdired-mode
, and a couple of modified core functions fromfiles.el
. I'd need to spend considerable time cleaning up the broken/unused pieces, or restore them to their working state. I'll need to put this on my todo-list . . .