aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-10-10 01:34:14 +0200
committerLars Ingebrigtsen2019-10-10 01:34:14 +0200
commitccea37f6ac503d2e94ca3dc0aa1aad079a2cc8d5 (patch)
treeb072eb8934dcf9e23315ee577946ce9bd3ac4f15
parent3f594fef9eeeda2272dc9858b6b17bbd5fa2f436 (diff)
downloademacs-ccea37f6ac503d2e94ca3dc0aa1aad079a2cc8d5.tar.gz
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.el9
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."
6211 (after-find-file nil nil t)) 6211 (after-find-file nil nil t))
6212 (t (user-error "Recover-file canceled"))))) 6212 (t (user-error "Recover-file canceled")))))
6213 6213
6214(defvar dired-mode-hook)
6215
6214(defun recover-session () 6216(defun recover-session ()
6215 "Recover auto save files from a previous Emacs session. 6217 "Recover auto save files from a previous Emacs session.
6216This command first displays a Dired buffer showing you the 6218This 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."
6230 (concat "\\`" (regexp-quote nd))) 6232 (concat "\\`" (regexp-quote nd)))
6231 t) 6233 t)
6232 (error "No previous sessions to recover"))) 6234 (error "No previous sessions to recover")))
6233 (let ((ls-lisp-support-shell-wildcards t)) 6235 (require 'dired)
6236 (let ((ls-lisp-support-shell-wildcards t)
6237 ;; Ensure that we don't omit the session files as the user may
6238 ;; have (as suggested by the manual) `dired-omit-mode' in the
6239 ;; hook.
6240 (dired-mode-hook (delete 'dired-omit-mode dired-mode-hook)))
6234 (dired (concat auto-save-list-file-prefix "*") 6241 (dired (concat auto-save-list-file-prefix "*")
6235 (concat dired-listing-switches " -t"))) 6242 (concat dired-listing-switches " -t")))
6236 (use-local-map (nconc (make-sparse-keymap) (current-local-map))) 6243 (use-local-map (nconc (make-sparse-keymap) (current-local-map)))