From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: AW Newsgroups: gmane.emacs.help Subject: Function needed to save a certain buffer every x seconds automatically Date: Thu, 26 Sep 2013 17:38:17 +0200 Message-ID: <6906143.LRjCqdsP7e@linux-ik7b.site> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit X-Trace: ger.gmane.org 1380209898 28974 80.91.229.3 (26 Sep 2013 15:38:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Sep 2013 15:38:18 +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 17:38:21 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 1VPDe0-0008NJ-TR for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Sep 2013 17:38:21 +0200 Original-Received: from localhost ([::1]:58500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPDe0-0002ze-GH for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Sep 2013 11:38:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPDde-0002uo-3N for help-gnu-emacs@gnu.org; Thu, 26 Sep 2013 11:38:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPDdW-00006M-Q4 for help-gnu-emacs@gnu.org; Thu, 26 Sep 2013 11:37:58 -0400 Original-Received: from mailout11.t-online.de ([194.25.134.85]:56872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPDdW-00005x-8V for help-gnu-emacs@gnu.org; Thu, 26 Sep 2013 11:37:50 -0400 Original-Received: from fwd14.aul.t-online.de (fwd14.aul.t-online.de ) by mailout11.t-online.de with smtp id 1VPDdQ-0005Gm-Pu; Thu, 26 Sep 2013 17:37:44 +0200 Original-Received: from linux-ik7b.site (rPdzQeZXZhGO0i49P-Az0u-5A6q+O4i3h8QtBZ305lEvd-xEILbPX4O-bOHm7GyQiJ@[217.233.207.134]) by fwd14.t-online.de with esmtp id 1VPDdF-0b7bM00; Thu, 26 Sep 2013 17:37:33 +0200 User-Agent: KMail/4.11.1 (Linux/3.10.10-25.g8038aea-desktop; KDE/4.11.1; x86_64; ; ) X-ID: rPdzQeZXZhGO0i49P-Az0u-5A6q+O4i3h8QtBZ305lEvd-xEILbPX4O-bOHm7GyQiJ X-TOI-MSGID: c692e6f1-4db5-4778-97ba-153f427e41bd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 194.25.134.85 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:93607 Archived-At: 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