Add dired-recent to keep a cache of recently opened directories

Inspired by (and mostly copied from)
https://github.com/novoid/dot-emacs/blob/master/config.org#dired-recent--c-z.
This commit is contained in:
Daniel - 2020-08-27 11:46:06 +02:00
parent 1187577348
commit 5d6110982b
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 10 additions and 0 deletions

10
init.el
View File

@ -216,6 +216,7 @@
(bind-key [remap fill-paragraph] #'endless/fill-or-unfill)
(unbind-key "C-x C-c" global-map)
(bind-key [remap keyboard-quit] #'keyboard-quit-context+)
(bind-key "C-z" #'dired-recent-open)
;; Custom helm bindings
@ -1807,6 +1808,9 @@ With given ARG, display files in `db/important-document-path."
(require 'dired-open)
(bind-key "M-RET" #'dired-open-xdg dired-mode-map)))
(with-demoted-errors "Non-Fatal Errors (dired-recent): %s"
(dired-recent-mode +1))
;; Gnus support in dired
(add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
@ -1877,6 +1881,12 @@ With given ARG, display files in `db/important-document-path."
:config (add-to-list 'dired-open-functions
#'dired-open-guess-shell-alist))
(use-package dired-recent
:ensure t
:init (setq dired-recent-max-directories nil)
:commands (dired-recent-mode
dired-recent-open))
(use-package gnus-dired
:commands (turn-on-gnus-dired-mode))