Windows 10 (64 bit), Emacs 26.1, dired+-20170818.1411
I want (in dired
mode) to open all folders in ONE buffer when press Enter
.
So in my init.el
(diredp-toggle-find-file-reuse-dir 1)
But it not help
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityI am not using Dired+, but I've bound this function to RET
in dired-mode-map
and it works for me in regular Dired:
(defun mu-find-file-reuse-dir-buffer ()
"Like `dired-find-file', but reuse Dired buffers."
(interactive)
(set-buffer-modified-p nil)
(let ((file (dired-get-file-for-visit)))
(if (file-directory-p file)
(find-alternate-file file)
(find-file file))))
I am not sure about "dired+", but for normal dired
you can try:
(define-key dired-mode-map (kbd "RET") 'dired-find-alternate-file)
(define-key dired-mode-map (kbd "^") (lambda () (interactive) (find-alternate-file "..")))
basically it will stop "buffer madness" when opening new directory....
more details you can find here:
It's not clear to me what you are trying to do. Command diredp-toggle-find-file-reuse-dir
toggles whether Dired find-file
commands reuse directories. That has nothing to so with showing the contents of "all folders in ONE buffer".
In a Dired buffer you can use i
on any subdirectory line to insert its contents in the current buffer. It sounds like that is closer to what you are looking for.
You can mark all subdirectories in the buffer, using * /
. Then you can insert all of their contents into the buffer using M-i
. I think that's what you're looking for.
(If you want to do this automatically and always, in your init file (which I don't recommend), you just write a function that invokes both of those commands, and then put that function on one of the Dired hooks.)
i
) does.