unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Function needed to save a certain buffer every x seconds automatically
@ 2013-09-26 15:38 AW
  2013-09-26 17:01 ` Michael Heerdegen
  2013-09-26 17:14 ` Andreas Röhler
  0 siblings, 2 replies; 7+ messages in thread
From: AW @ 2013-09-26 15:38 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Function needed to save a certain buffer every x seconds automatically
@ 2013-09-26 17:30 AW
  0 siblings, 0 replies; 7+ messages in thread
From: AW @ 2013-09-26 17:30 UTC (permalink / raw)
  To: help-gnu-emacs


> Hi AW,
> 
... 
> Mmh, wait, the original package also has a toggle function,
> `auto-save-buffers-toggle'.  Isn't that what you want?
> 
> In both cases, you must have started the timer before toggling does
> anything.
> 
> 
> Regards,
> 
> Michael.

Dear Michael,

you are right, I did not occur to me to read the auto-save-buffers function.

Thank you!

Regards,

Alexander



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-10-02  3:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-26 15:38 Function needed to save a certain buffer every x seconds automatically AW
2013-09-26 17:01 ` Michael Heerdegen
2013-09-26 17:14 ` Andreas Röhler
2013-09-26 18:14   ` AW
2013-09-26 18:39     ` Andreas Röhler
2013-10-02  3:18     ` Kevin Rodgers
  -- strict thread matches above, loose matches on Subject: below --
2013-09-26 17:30 AW

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).