0

This question is an exact duplicate of:

Windows 10, Emacs 26.1

When in dired mode when I press Enter over folder it's open in separate buffer. So after input in 10 folder the Emacs open 10 buffers. I know about press "a". But it not comfortable. I need to open folder only in ONE buffer when press ENTER. How I can open all folder only in ONE buffer?

I don't like dired+. Has any another approach?

marked as duplicate by Drew, Stefan, DoMiNeLa10 Nov 26 '18 at 18:42

This question was marked as an exact duplicate of an existing question.

  • Are you asking how to make Enter do the same thing as a ? – phils Nov 26 '18 at 9:53
  • Yes. I want to open ALL folder only in ONE buffer. – Alexei Nov 26 '18 at 10:07
2

So you want to make RET do what a does.

C-hka in dired tells us

a runs the command dired-find-alternate-file (found in dired-mode-map), which is an interactive compiled Lisp function in ‘dired.el’.

Therefore:

(with-eval-after-load "dired"
  (define-key dired-mode-map (kbd "RET") 'dired-find-alternate-file))

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