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: Saving the Messages buffer Date: Wed, 22 Jan 2014 01:32:28 -0700 Message-ID: References: <87iotdvuzb.fsf@nl106-137-194.student.uu.se> <87sish54c7.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1390379544 30568 80.91.229.3 (22 Jan 2014 08:32:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Jan 2014 08:32:24 +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 Jan 22 09:32:30 2014 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 1W5tEc-0003zt-QN for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Jan 2014 09:32:30 +0100 Original-Received: from localhost ([::1]:34233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5tEc-0003wi-8r for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Jan 2014 03:32:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5tEK-0003wX-9g for help-gnu-emacs@gnu.org; Wed, 22 Jan 2014 03:32:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5tED-0005BA-0R for help-gnu-emacs@gnu.org; Wed, 22 Jan 2014 03:32:12 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:60284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5tEC-0005B0-QI for help-gnu-emacs@gnu.org; Wed, 22 Jan 2014 03:32:04 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W5tEA-0003qS-R0 for help-gnu-emacs@gnu.org; Wed, 22 Jan 2014 09:32:02 +0100 Original-Received: from 70-59-41-30.hlrn.qwest.net ([70.59.41.30]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Jan 2014 09:32:02 +0100 Original-Received: from kevin.d.rodgers by 70-59-41-30.hlrn.qwest.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Jan 2014 09:32:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 70-59-41-30.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: <87sish54c7.fsf@nl106-137-194.student.uu.se> 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:95536 Archived-At: On 1/21/14 3:58 PM, Emanuel Berg wrote: > Aha, so `auto-save-mode' says that auto-save should > apply to the current buffer. So that doesn't make sense > in my previous post, but the hook should still work, as > long as there are buffers "under the influence" all > round, which is likely. > > But, using that to solve the problem of the OP, if the > message buffer could be associated with a file, and > then itself subjected to auto-save-mode, that would be > even better. Try: > > (let ((buffer "*Messages*")) > (with-current-buffer buffer > (set-visited-file-name buffer t) ; no confirmation > (auto-save-mode) )) The first arg to set-visited-file-name is FILENAME, not BUFFER. -- Kevin Rodgers Denver, Colorado, USA