all repos — archive/dotfiles @ 046dfb9cf1e1690487d20091ae4545f158141fa6

Superseded by nixfiles

Emacs: install and configure dired-subtree
Alan Pearce alan@alanpearce.co.uk
Sun, 06 Jul 2014 11:54:24 +0100
commit

046dfb9cf1e1690487d20091ae4545f158141fa6

parent

915d006a6711e4576c687a0f01832a8ac64838e5

2 files changed, 17 insertions(+), 0 deletions(-)

jump to
M tag-emacs/emacs.d/Casktag-emacs/emacs.d/Cask
@@ -19,6 +19,7 @@ (depends-on "deferred") (depends-on "diff-hl")
 (depends-on "diminish")
 (depends-on "dired+")
+(depends-on "dired-subtree")
 (depends-on "discover")
 (depends-on "discover-my-major")
 (depends-on "elisp-slime-nav")
M tag-emacs/emacs.d/init.eltag-emacs/emacs.d/init.el
@@ -260,6 +260,22 @@ (dired-omit-mode 1)             (setq dired-omit-files "#\\|\\.$"
                   dired-find-subdir t)))
 
+(req-package dired-subtree
+  :defer t
+  :config (progn
+            (setq dired-subtree-use-backgrounds nil)
+            (defun dired-subtree-maybe-up ()
+              "Jump up one subtree or directory"
+              (interactive)
+              (let ((ov (dired-subtree--get-ov)))
+                (if ov
+                    (progn (goto-char (overlay-start ov))
+                           (dired-previous-line 1))
+                  (dired-up-directory))))
+            (bind-key "^" #'dired-subtree-maybe-up dired-mode-map))
+  :init (progn
+          (bind-key "i" #'dired-subtree-insert dired-mode-map)))
+
 ;;;; Documentation
 
 (req-package which-func