I am following this wiki suggestion to set up Emacs so that, i can move forward and backwards in dired mode without creating new buffers.
a key together with the
(put 'dired-find-alternate-file 'disabled nil) setting allows me to move into directories without new buffers.
But the hook for the
^ key mentioned in the wiki is not working for me. Going to previous directory with
^ still opens new buffers.
Here are the settings I am using in my
; dired settings (require 'dired-x) (setq dired-omit-files "^\\.?#\\|^\\.$\\|^\\.\\.$\\|^\\.") (add-hook 'dired-mode-hook (lambda () (dired-omit-mode 1))) (setq dired-listing-switches "-aBhl --group-directories-first") (put 'dired-find-alternate-file 'disabled nil) (add-hook 'dired-mode-hook (lambda () (define-key dired-mode-map (kbd "^") (lambda () (interactive) (find-alternate-file "..")))))
C-h k ^you'll probably see that the default function
dired-up-directoryis still being called. Are the any error messages? I get errors when trying to load
Key sequence * O starts with non-prefix key *
define-keykeyboard shortcut is not getting recognized for some reason. If i type
M-x find-alternate-fileand then
..it goes back without creating new buffer. Also
C-h k ^shows that
^is bound to
dired-up-directory. I do not get any errors though.