From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: How to automatically write *Messages" buffer to a file? Date: Wed, 24 Nov 2004 20:16:30 GMT Message-ID: References: <87sm6zl4sx.fsf@thalassa.informatimago.com> <01c4d23d$Blat.v2.2.2$c2b81b20@zahav.net.il> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1101327355 29007 80.91.229.6 (24 Nov 2004 20:15:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 Nov 2004 20:15:55 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 24 21:15:50 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CX3YM-0005x5-00 for ; Wed, 24 Nov 2004 21:15:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CX3hV-0002m4-Rl for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Nov 2004 15:25:17 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!charlie.risq.qc.ca!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:beCGLh+D4QTP0st1Nn2ueXJwR9c= Original-Lines: 25 Original-NNTP-Posting-Host: 132.204.24.84 Original-X-Complaints-To: abuse@umontreal.ca Original-X-Trace: charlie.risq.qc.ca 1101327390 132.204.24.84 (Wed, 24 Nov 2004 15:16:30 EST) Original-NNTP-Posting-Date: Wed, 24 Nov 2004 15:16:30 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:126881 Original-To: help-gnu-emacs@gnu.org 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: main.gmane.org gmane.emacs.help:22282 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22282 > (make-variable-buffer-local 'after-change-functions) Never use `make-variable-buffer-local' on a variable which belongs to some other package. You want to use `make-local-variable' instead. Note that in the above case you don't need either of them because after-change-functions is already automatically made buffer-local. And even if you wanted to make it buffer-local manually, you shouldn't use make-local-variable but make-local-hook since after-change-functions is a hook. > (setq after-change-functions > '(log-message)) [...] > (setq after-change-functions nil) Never use `setq' on a hook. Use `add-hook' or `remove-hook'. Stefan PS: As for your question, don't use `append-to-file', use `write-region' instead, and pass `quiet' as the VISIT argument to prevent the message.