2

Using Emacs 26.1, I have enabled dired-omit-mode globally with (add-hook 'dired-mode-hook #'dired-omit-mode). When using recover-session, I don't see any files. How to fix this?

Creating a .dir-locals.el containing ((dired-mode (dired-omit-mode))) didn't work.


This bug should be fixed in Emacs 27.1.

1 Answer 1

2

Instead of dired-omit-mode, add a wrapper to dired-mode-hook that checks dired-directory:

(defun my-turn-on-dired-omit-mode ()
  (unless (and auto-save-list-file-prefix
               (string= dired-directory
                        (concat auto-save-list-file-prefix "*")))
    (dired-omit-mode)))
(add-hook 'dired-mode-hook #'my-turn-on-dired-omit-mode)
;; (remove-hook 'dired-mode-hook #'dired-omit-mode)
4
  • 2
    This rather sounds like a bug which you should report with M-x report-emacs-bug
    – phils
    Jun 15, 2019 at 11:44
  • 2
    done (15 chars)
    – Nova
    Jun 15, 2019 at 12:04
  • 1
    More helpful than "(15 chars)" would be: debbugs.gnu.org/36223
    – npostavs
    Jun 15, 2019 at 16:44
  • I didn't know the link before I received the confirmation mail.
    – Nova
    Jun 15, 2019 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.