From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: AW Newsgroups: gmane.emacs.help Subject: Re: Function needed to save a certain buffer every x seconds automatically Date: Thu, 26 Sep 2013 20:14:46 +0200 Message-ID: <2264045.EjpuyHfElB@linux-ik7b.site> References: <6906143.LRjCqdsP7e@linux-ik7b.site> <52446B5E.6010906@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1380219285 24378 80.91.229.3 (26 Sep 2013 18:14:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Sep 2013 18:14:45 +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 20:14:48 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 1VPG5P-0007jL-O5 for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Sep 2013 20:14:47 +0200 Original-Received: from localhost ([::1]:59317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPG5P-0002Wa-9b for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Sep 2013 14:14:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPG54-0002W7-FU for help-gnu-emacs@gnu.org; Thu, 26 Sep 2013 14:14:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPG4w-0007Kt-OQ for help-gnu-emacs@gnu.org; Thu, 26 Sep 2013 14:14:26 -0400 Original-Received: from mailout03.t-online.de ([194.25.134.81]:41737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPG4w-0007Ka-Fx for help-gnu-emacs@gnu.org; Thu, 26 Sep 2013 14:14:18 -0400 Original-Received: from fwd51.aul.t-online.de (fwd51.aul.t-online.de ) by mailout03.t-online.de with smtp id 1VPG4t-00089A-FN; Thu, 26 Sep 2013 20:14:15 +0200 Original-Received: from linux-ik7b.site (ECB6AkZ-Yh6ngTv1xjJwIZsoStGfgYF6L7oVZR5oQOQhNByGzhBQcCl0uADI5GVw2C@[91.19.23.173]) by fwd51.t-online.de with esmtp id 1VPG4l-0n2koi0; Thu, 26 Sep 2013 20:14:07 +0200 User-Agent: KMail/4.11.1 (Linux/3.10.10-25.g8038aea-desktop; KDE/4.11.1; x86_64; ; ) In-Reply-To: <52446B5E.6010906@easy-emacs.de> X-ID: ECB6AkZ-Yh6ngTv1xjJwIZsoStGfgYF6L7oVZR5oQOQhNByGzhBQcCl0uADI5GVw2C X-TOI-MSGID: 43224579-c7f1-44cb-92d9-4693dc17a334 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 194.25.134.81 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:93629 Archived-At: Am Donnerstag, 26. September 2013, 19:14:06 schrieb Andreas R=F6hler: > Am 26.09.2013 17:38, schrieb AW: > > Hello! > >=20 > > 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. > >=20 > > I'd like to have a mechanism to save the LaTeX file every x seconds= . >=20 > So you want to save a single buffer, not all, as auto-save-buffers do= es? >=20 > In this case here a little step forward >=20 > (run-with-idle-timer 1 nil (lambda () (set-buffer "MY-TEX")(write-fil= e > (expand-file-name "~/my.tex"))(message (format-time-string "%Y-%m-%d = %a > %H:%M" (current-time))))) >=20 > It runs just once, as timers not to switch off might turn nasty. > Gives some messages when saving. >=20 > Edit the my-tex parts. >=20 > Andreas Would it be possible to take the current buffer instead of manually ins= erting=20 the file name? And besides that: thank you for your help! Regards,=20 Alexander