4

How can I replace dired with something like deer? Any time emacs wants to browse a directory with C-x d or from a link on the homescreen (from projectile or something), I want to open it in ranger or deer instead of dired. Is that possible?

1

2 Answers 2

6

See the find-directory-functions variable.

By default (in most cases) it results in dired-noselect being used. You would add a function which used the thing you want to use instead, making sure it has priority over the dired entry (if not replacing it entirely; depending on your exact intentions).

Your function will be called (by find-file-noselect) with a parameter of the directory path.

For the specific dired bindings like C-x d, you would want to remap them to your preferred commands.

e.g.

(global-set-key [remap dired] 'my-dired-replacement)
2
  • While this is a fine answer, it ignores that ranger is a ncurses program and deer a zsh-specific thing.
    – wasamasa
    Sep 28, 2015 at 6:34
  • I confess that I was presuming these were Emacs libraries (or at minimum, things with existing Emacs integration). Perhaps the question was actually referring to github.com/ralesi/ranger.el which also has a "Minimal Ranger Mode" named deer-mode?
    – phils
    Sep 28, 2015 at 20:13
3

You can simply use (ranger-override-dired-mode t) in your init file. See https://github.com/ralesi/ranger.el#setting-as-default-directory-handler

Your Answer

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

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