From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.help Subject: Re: Reliable indication that auto-saving should not be done Date: Fri, 30 Mar 2007 13:13:48 +0200 Organization: Chalmers University of Technology, Sweden Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1175294328 4627 80.91.229.12 (30 Mar 2007 22:38:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Mar 2007 22:38:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 30 13:37:46 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HXFQO-0001y4-EA for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Mar 2007 13:37:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HXFT4-00080d-GL for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Mar 2007 06:40:30 -0500 Original-Path: shelby.stanford.edu!newshub.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.swip.net!swipnet!newsfeed.sunet.se!news01.sunet.se!129.16.222.141.MISMATCH!gide.ita.chalmers.se!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: gamma02.me.chalmers.se Original-X-Trace: gide.ita.chalmers.se 1175253228 4421 129.16.50.72 (30 Mar 2007 11:13:48 GMT) Original-X-Complaints-To: usenet@gide.ita.chalmers.se Original-NNTP-Posting-Date: Fri, 30 Mar 2007 11:13:48 +0000 (UTC) Mail-Copies-To: never User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux) Cancel-Lock: sha1:8IqLJlkAmVfEIjJbvi238LAey6I= Original-Xref: shelby.stanford.edu gnu.emacs.help:146701 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42306 "Denis Bueno" writes: > I install that function in `auto-save-hook'. However, in some buffers > auto-saving is off (for security reasons) but my hook still gets run. > My questions are, first of all, should the auto-save hook be run when > auto-saving is off? The auto-saving mechanism is global. Periodically Emacs runs the function `do-auto-save' ("Auto-save all buffers that need it"). This runs `auto-save-hook' once before saving the buffers. > Secondly, if so, what is a reliable indication that auto-save is on > (or off)? Variable: buffer-auto-save-file-name This buffer-local variable is the name of the file used for auto-saving the current buffer. It is `nil' if the buffer should not be auto-saved. -- Johan Bockgård