Hi Jean, thank you very much for your help. I think I solved the problem for now. In the "asciidoc.el" file I uncommented the last line: ;;(run-with-timer 1 3 #'rcd-asciidoctor-preview-buffer-as-html) and therefore when opening emacs it doesn’t give me this error message: desktop file is running, it may be dangerous to... because you said anyway: only when I need the timer I should run it. > ;; Though I would not recommend putting this in init.el as that is > ;; too many times preview. It is better turning on and off the timer > ;; function only when you need it. > ;;(run-with-timer 1 3 #'rcd-asciidoctor-preview-buffer-as-html) Kind regards Gottfried > Then I could invoke it as command: > > M-x toggle-markdown-preview > > and then timer toggles, it turns on or turns off. > > Then you could hold your variable with the timer and timer function in separate file, it need not be init.el and you load it when you need it. --