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

enter image description here

3 Answers 3


I 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."
  (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:


  • Not help. Same result. Sep 1, 2018 at 14:46
  • what about A instead of Enter ?
    – rdbeni0
    Sep 1, 2018 at 15:39

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 want to use one buffer when in dired mode press Enter Sep 1, 2018 at 15:38
  • I mean one buffer... when open "helm-mini" to show only last folder name. Not all folders that I open before. Sep 1, 2018 at 15:42
  • I found the problem When I press Enter - it's ok. In "helm-mini" show ONLY LAST entered folder. But if I use "Jump to bookmark" than show MANY folders in "helm-mini" buffer. How I can fix this? Sep 1, 2018 at 15:44
  • Sorry, but I don't understand what you're saying/asking in these comments. Likewise, your question post. What do you mean by "open" all folders in one buffer? Are you talking about adding the listings of all subdirectories to the top-level directory listing? That's what "including" a subdir listing (e.g. i) does.
    – Drew
    Sep 1, 2018 at 22:34
  • I mean this: emacs.stackexchange.com/questions/44484/… Sep 2, 2018 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.