all repos — archive/dotfiles @ 1fcdf96677414dc49afe2c3225ed79aa11ee8956

Superseded by nixfiles

Emacs: Run dired-omit-mode in the correct place

Needs to run in dired-mode-hook. Create a wrapper command so that we can
call it interactively otherwise.
Alan Pearce alan@alanpearce.co.uk
Wed, 16 Jul 2014 21:37:12 +0100
commit

1fcdf96677414dc49afe2c3225ed79aa11ee8956

parent

a1cd5937fc7d4a73c7b3a9a7dcae23ac5c09bde5

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M tag-emacs/emacs.d/init.eltag-emacs/emacs.d/init.el
@@ -286,7 +286,10 @@ :config (progn             (diredp-toggle-find-file-reuse-dir 1)
             (unbind-key "C-h C-m" dired-mode-map)
             (bind-key "." #'diredp-describe-file dired-mode-map)
-            (dired-omit-mode 1)
+            (defun turn-on-dired-omit-mode ()
+              (interactive)
+              (dired-omit-mode 1))
+            (add-hook 'dired-mode-hook #'turn-on-dired-omit-mode)
             (setq dired-omit-files "#\\|\\.$"
                   dired-find-subdir t)))