diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-10-10 01:34:14 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-10-10 01:34:14 +0200 |
commit | ccea37f6ac503d2e94ca3dc0aa1aad079a2cc8d5 (patch) | |
tree | b072eb8934dcf9e23315ee577946ce9bd3ac4f15 | |
parent | 3f594fef9eeeda2272dc9858b6b17bbd5fa2f436 (diff) | |
download | emacs-ccea37f6ac503d2e94ca3dc0aa1aad079a2cc8d5.tar.gz emacs-ccea37f6ac503d2e94ca3dc0aa1aad079a2cc8d5.tar.bz2 emacs-ccea37f6ac503d2e94ca3dc0aa1aad079a2cc8d5.zip |
Work around bad interaction between dired-omit-mode and recover-session
* lisp/files.el (recover-session): Add ugly hack to try to ensure
that we're actually showing the session files (bug#36223).
-rw-r--r-- | lisp/files.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index 20bc204b061..fdd7c75ced6 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6211,6 +6211,8 @@ an auto-save file." (after-find-file nil nil t)) (t (user-error "Recover-file canceled"))))) +(defvar dired-mode-hook) + (defun recover-session () "Recover auto save files from a previous Emacs session. This command first displays a Dired buffer showing you the @@ -6230,7 +6232,12 @@ Then you'll be asked about a number of files to recover." (concat "\\`" (regexp-quote nd))) t) (error "No previous sessions to recover"))) - (let ((ls-lisp-support-shell-wildcards t)) + (require 'dired) + (let ((ls-lisp-support-shell-wildcards t) + ;; Ensure that we don't omit the session files as the user may + ;; have (as suggested by the manual) `dired-omit-mode' in the + ;; hook. + (dired-mode-hook (delete 'dired-omit-mode dired-mode-hook))) (dired (concat auto-save-list-file-prefix "*") (concat dired-listing-switches " -t"))) (use-local-map (nconc (make-sparse-keymap) (current-local-map))) |