Disable global-wakatime-mode when recovering files
This commit is contained in:
parent
ad3984841a
commit
33e93de7e3
@ -4006,7 +4006,16 @@ It needs a helper script to work properly.
|
|||||||
(setq wakatime-api-key (password-store-get "wakatime-api-key")
|
(setq wakatime-api-key (password-store-get "wakatime-api-key")
|
||||||
wakatime-cli-path (executable-find "wakatime"))
|
wakatime-cli-path (executable-find "wakatime"))
|
||||||
:config
|
: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
|
#+END_SRC
|
||||||
|
|
||||||
* Elfeed
|
* Elfeed
|
||||||
|
Loading…
Reference in New Issue
Block a user