mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
feat: don't delay when opening auto-saved files
If a file has auto-saved data (see auto-save-default), after-find-file will stop the world for 1 second to tell you about it. Very annoying. Just log it to *Messages* and open the file immediately.
This commit is contained in:
@ -130,6 +130,13 @@ or file path may exist now."
|
||||
(eq buffer (window-buffer (selected-window))) ; only visible buffers
|
||||
(set-auto-mode))))))
|
||||
|
||||
(defadvice! doom--shut-up-autosave-a (fn &rest args)
|
||||
"If a file has autosaved data, `after-find-file' will pause for 1 second to
|
||||
tell you about it. Very annoying. This prevents that."
|
||||
:around #'after-find-file
|
||||
(letf! ((#'sit-for #'ignore))
|
||||
(apply fn args)))
|
||||
|
||||
;; HACK Emacs generates long file paths for its auto-save files; long =
|
||||
;; `auto-save-list-file-prefix' + `buffer-file-name'. If too long, the
|
||||
;; filesystem will murder your family. To appease it, I compress
|
||||
|
Reference in New Issue
Block a user