Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question - Can I replace dired with deer? #49

Closed
synic opened this issue Sep 28, 2015 · 7 comments
Closed

Question - Can I replace dired with deer? #49

synic opened this issue Sep 28, 2015 · 7 comments

Comments

@synic
Copy link

synic commented Sep 28, 2015

I've been trying my hand at emacs lisp, but unfortunately it's not working quite right. Maybe you can help? I'm trying to replace dired with deer as the default directory handler. I've got the following function:

(defun deer-find-file (&optional entry ignore-history)
  "Find file in deer buffer. `ENTRY` can be used as a path or filename, else
will use currently selected file in ranger. `IGNORE-HISTORY` will not update
history-ring on change."
  (interactive)
  (setq ranger-minimal t)
  (ranger-find-file entry ignore-history)
  )

And then, in my config, I have this:

  (setq find-directory-functions '(deer-find-file cvs-dired-noselect dired-noselect))

Unfortunately, when I try to open a directory, it says:

eval: Lisp nesting exceeds `max-lisp-eval-depth'
@punassuming
Copy link
Owner

@synic, I will try to figure out how to do this. The one complication I see is that I have most of the ranger variables globally defined, so multiple deer or ranger windows will likely not work. I can look into window specific variables to store all this data, but haven't had the need to until recently when I fixed frame checking behaviour.

Another thing you can try is to add a hook to dired-mode-hook or dired-mode-load-hook to open ranger after loading the dired buffer.

@punassuming
Copy link
Owner

@synic, added PR in spacemacs to work this way. punassuming/spacemacs@6bbaade

@synic
Copy link
Author

synic commented Sep 28, 2015

Hrmm, it doesn't seem to work like I expect - maybe I'm going about this the wrong way. The project links on the homepage are nice, but they open in dired. Typing :e ~/ opens dired (but not always, this seems to change every time I type it). These are the behaviors I want to change - maybe I need to change them in spacemacs instead of in ranger.

I really only want to use one filemanager, but if I can replace it in those contexts, it should be sufficient.

@punassuming
Copy link
Owner

@synic, No it doesn't, I am cancelling PR and adding options into ranger specifically.

@synic
Copy link
Author

synic commented Sep 28, 2015

ok! Thank you.

@punassuming
Copy link
Owner

@synic, commit is in setting is ranger-override-dired.

@synic
Copy link
Author

synic commented Oct 4, 2015

Yay, it works! Thank you thank you.

@synic synic closed this as completed Oct 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants