From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Function needed to save a certain buffer every x seconds automatically
Date: Thu, 26 Sep 2013 19:14:06 +0200 [thread overview]
Message-ID: <52446B5E.6010906@easy-emacs.de> (raw)
In-Reply-To: <6906143.LRjCqdsP7e@linux-ik7b.site>
Am 26.09.2013 17:38, schrieb AW:
> 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.
>
So you want to save a single buffer, not all, as auto-save-buffers does?
In this case here a little step forward
(run-with-idle-timer 1 nil (lambda () (set-buffer "MY-TEX")(write-file (expand-file-name "~/my.tex"))(message (format-time-string "%Y-%m-%d %a %H:%M" (current-time)))))
It runs just once, as timers not to switch off might turn nasty.
Gives some messages when saving.
Edit the my-tex parts.
Andreas
next prev parent reply other threads:[~2013-09-26 17:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52446B5E.6010906@easy-emacs.de \
--to=andreas.roehler@easy-emacs.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).