[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Function needed to save a certain buffer every x seconds automatically
From: |
AW |
Subject: |
Function needed to save a certain buffer every x seconds automatically |
Date: |
Thu, 26 Sep 2013 17:38:17 +0200 |
User-agent: |
KMail/4.11.1 (Linux/3.10.10-25.g8038aea-desktop; KDE/4.11.1; x86_64; ; ) |
Hello!
To get a fast refreshing PDF of my LaTeX file, I use latexmk, which renders a
PDF every time the LaTeX file changed on the hard disk.
I'd like to have a mechanism to save the LaTeX file every x seconds.
I found this solution:
(require 'auto-save-buffers)
(run-with-idle-timer 1 t 'auto-save-buffers)
If I put that into my .emacs, Emacs saves every buffer immediately after a
change of the buffer.
But it is cumbersome to switch that off in the .emacs file, if not needed, and
on, if needed. Could someone write a function to switch this line
(run-with-idle-timer 1 t 'auto-save-buffers)
on and off?
Thank you!
Regards,
Alexander
- Function needed to save a certain buffer every x seconds automatically,
AW <=