From 1787aca0266f4ee197da8311adc3a65b56cb4daa Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 19 Nov 2018 13:02:56 +0100 Subject: [PATCH] [Bugfix] Fix running condition and loading of real-auto-save --- configuration.org | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configuration.org b/configuration.org index 98def4f..4510556 100644 --- a/configuration.org +++ b/configuration.org @@ -2149,7 +2149,7 @@ First, a function that turns off auto-saving for remote files. #+BEGIN_SRC emacs-lisp (defun gpolonkai/dont-autosave-remote () - (unless (file-remote-p (or (buffer-file-name) "")) + (when (and buffer-file-name (not (file-remote-p buffer-file-name))) (real-auto-save-mode))) #+END_SRC @@ -2157,8 +2157,10 @@ Then configure ~real-auto-save-mode~ #+BEGIN_SRC emacs-lisp (use-package real-auto-save + :demand t :hook - (text-mode . gpolonkai/dont-autosave-remote)) + (text-mode . gpolonkai/dont-autosave-remote) + (prog-mode . gpolonkai/dont-autosave-remote)) #+END_SRC ** Help merging ~pacsave~ and ~pacnew~ files