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

Use dirtree-expand instead of `find-file-other-window- when :file is a directory #5

Open
vermiculus opened this issue Mar 21, 2015 · 0 comments

Comments

@vermiculus
Copy link

I'd like to stay in dirtree when click/RET/whatever on a directory name (and not just the icon).

I've tried patching dirtree-select with very limited success:

(defun dirtree-select (node &rest ignore)
  "Open file in other window"
  (let ((file (widget-get node :file)))
    (and file
         (if (file-directory-p file) ;note
             (dirtree-expand
              (progn
                (beginning-of-line)
                (widget-forward 1)
                (widget-at (point))))
           (find-file-other-window file)))))

but I cannot seem to get dirtree-expand to cooperate. Can there be a better way to do this? I think C-o is a completely reasonable way to get out of dirtree into dired if so desired – I don't think there'll be a loss of functionality.

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

1 participant