From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: Function needed to save a certain buffer every x seconds automatically Date: Thu, 26 Sep 2013 19:14:06 +0200 Message-ID: <52446B5E.6010906@easy-emacs.de> References: <6906143.LRjCqdsP7e@linux-ik7b.site> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1380215540 7817 80.91.229.3 (26 Sep 2013 17:12:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Sep 2013 17:12:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 26 19:12:23 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VPF70-0001ds-KJ for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Sep 2013 19:12:22 +0200 Original-Received: from localhost ([::1]:59065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPF70-0003Sy-5H for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Sep 2013 13:12:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPF6j-0003Sj-Ew for help-gnu-emacs@gnu.org; Thu, 26 Sep 2013 13:12:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPF6b-0005No-Nh for help-gnu-emacs@gnu.org; Thu, 26 Sep 2013 13:12:05 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.186]:52136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPF6b-0005Nb-Cs for help-gnu-emacs@gnu.org; Thu, 26 Sep 2013 13:11:57 -0400 Original-Received: from purzel.sitgens (brln-4db9ef2e.pool.mediaWays.net [77.185.239.46]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MLkJD-1VQ4BU2VN5-000g3u; Thu, 26 Sep 2013 19:11:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: <6906143.LRjCqdsP7e@linux-ik7b.site> X-Provags-ID: V02:K0:bOmgMzI/90I+CTgw2tmog/cLSHaatRN6XKk5eDZ8PGQ KY3kvtV4M+Hte1tVIXIZR+00InTYu+WiKOhndGA6rHh+3k1MwI 6/y4q4tKw+fDmhaKKkebCjwE/yTBMXD3CrByku3hYrgZTdnp4u Gfqt6Sm0nZ1h5KBUP4KhPhUYegCPtRhYgMzbd7F/gCCm3Yvcms 8iJbGOqF8Ye1nZ8vnMjGRopXBa8IQSu6nt9ytKCU5VSYl/qcmg Y1OHbWcRXMh5KfK06x6oASYF8wrSEwPEjR8OdCWWXyo2qMW2vd 6NY6UhLbK5HMmK/cyCctJKv9iOmq7wWx+/f5dmvTjOcM+IyYNc Uhq4YxVILx92qLR/g8EFPMvAVMlfcXnyc9dndljRU X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.126.186 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93621 Archived-At: 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