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:
parent
0df8d78bd7
commit
12732be155
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue