diff --git a/emacs/init.org b/emacs/init.org index 21838a3..cae43a2 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -4006,7 +4006,16 @@ It needs a helper script to work properly. (setq wakatime-api-key (password-store-get "wakatime-api-key") wakatime-cli-path (executable-find "wakatime")) :config - (global-wakatime-mode)) + (global-wakatime-mode) + ;; global-wakatime-mode breaks recovering autosaves for some reason + (advice-add 'recover-this-file :around + (lambda (oldfn &rest args) + (let ((wakatime-was-enabled global-wakatime-mode)) + (when wakatime-was-enabled + (global-wakatime-mode -1)) + (apply oldfn args) + (when wakatime-was-enabled + (global-wakatime-mode)))))) #+END_SRC * Elfeed