From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Function needed to save a certain buffer every x seconds automatically Date: Tue, 01 Oct 2013 21:18:50 -0600 Message-ID: References: <6906143.LRjCqdsP7e@linux-ik7b.site> <52446B5E.6010906@easy-emacs.de> <2264045.EjpuyHfElB@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: 8bit X-Trace: ger.gmane.org 1380683956 4073 80.91.229.3 (2 Oct 2013 03:19:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Oct 2013 03:19:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 02 05:19:19 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 1VRCy6-0007gR-Uj for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Oct 2013 05:19:19 +0200 Original-Received: from localhost ([::1]:33696 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRCy6-0006Ug-FO for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Oct 2013 23:19:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRCxq-0006UF-4c for help-gnu-emacs@gnu.org; Tue, 01 Oct 2013 23:19:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRCxi-00066j-S7 for help-gnu-emacs@gnu.org; Tue, 01 Oct 2013 23:19:02 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:43484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRCxi-00066f-L7 for help-gnu-emacs@gnu.org; Tue, 01 Oct 2013 23:18:54 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VRCxg-0007LE-Q5 for help-gnu-emacs@gnu.org; Wed, 02 Oct 2013 05:18:52 +0200 Original-Received: from 70-59-0-106.hlrn.qwest.net ([70.59.0.106]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Oct 2013 05:18:52 +0200 Original-Received: from kevin.d.rodgers by 70-59-0-106.hlrn.qwest.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Oct 2013 05:18:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 33 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 70-59-0-106.hlrn.qwest.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 In-Reply-To: <2264045.EjpuyHfElB@linux-ik7b.site> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:93788 Archived-At: On 9/26/13 12:14 PM, AW wrote: > Am Donnerstag, 26. September 2013, 19:14:06 schrieb Andreas Röhler: >> 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 > > Would it be possible to take the current buffer instead of manually inserting > the file name? Instead: Map over all buffers, and save the LaTex buffers. -- Kevin Rodgers Denver, Colorado, USA