From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Denis Bueno" Newsgroups: gmane.emacs.help Subject: Reliable indication that auto-saving should not be done Date: Thu, 29 Mar 2007 20:10:47 -0400 Message-ID: <6dbd4d000703291710q237ede80n81a155ddb1b621f8@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1175213469 12390 80.91.229.12 (30 Mar 2007 00:11:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Mar 2007 00:11:09 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 30 02:11:02 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 1HX4hq-0002w3-NA for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Mar 2007 02:11:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HX4kT-0001VM-JX for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Mar 2007 19:13:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HX4kH-0001VD-9p for help-gnu-emacs@gnu.org; Thu, 29 Mar 2007 20:13:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HX4kG-0001Uy-2t for help-gnu-emacs@gnu.org; Thu, 29 Mar 2007 20:13:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HX4kF-0001Uv-VS for help-gnu-emacs@gnu.org; Thu, 29 Mar 2007 19:13:32 -0500 Original-Received: from nz-out-0506.google.com ([64.233.162.226]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HX4hc-0006TH-73 for help-gnu-emacs@gnu.org; Thu, 29 Mar 2007 20:10:48 -0400 Original-Received: by nz-out-0506.google.com with SMTP id s1so265582nze for ; Thu, 29 Mar 2007 17:10:47 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=PR873deSoRhIhNlSBC9EKNg6DtQu3UHmevDTu+SRf2uKcQV08edzWvfyN549EDNOjlbip5obPvGXKthoBoVogWl1iTAdsYMpId+ko9rUKOAR53JfjOCiawMDlTPF8j6eI4qQCwQkSDe1I1wT1R4EFHVdG7/QBiboybTmfPYuRzw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=HBMQzfUFyYI8MthQ28107wai2FZtMXTSxCC1EA2/CA/UFRVhu3repTLCz93fW6HCNyjl6C6QwoceWZyXkqtT+PocjeSNXdRXDB5s5w6Kl6qD7kEW6/giySZED+99KQHj+81aj+A6/B/DRQWiCtOqNiiFp8/kN8gNpJqoCM7k78o= Original-Received: by 10.114.107.19 with SMTP id f19mr506421wac.1175213447327; Thu, 29 Mar 2007 17:10:47 -0700 (PDT) Original-Received: by 10.114.195.2 with HTTP; Thu, 29 Mar 2007 17:10:47 -0700 (PDT) Content-Disposition: inline X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) 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:42293 Archived-At: All- I wrote a pretty simple function that saves the current buffer to a file in a local darcs repo and records its changes. I wanted versioned records of changes I make to the files I edit. 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? Secondly, if so, what is a reliable indication that auto-save is on (or off)? (In particular when I open encrypted files using crypt++.el, it sends a message to the minibuffer, saying "Auto save off (in this buffer)" and my hook is run just the same.) Thanks in advance. -Denis