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: how to make the "file has auto save data..." message unskippable? Date: Tue, 07 Jul 2009 00:35:55 -0600 Message-ID: References: <24345123.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040205080107010104030207" X-Trace: ger.gmane.org 1246948603 17813 80.91.229.12 (7 Jul 2009 06:36:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jul 2009 06:36:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 07 08:36:37 2009 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 1MO4I8-00028W-O1 for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Jul 2009 08:36:37 +0200 Original-Received: from localhost ([127.0.0.1]:60844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MO4I8-0000Wd-6F for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Jul 2009 02:36:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MO4Hd-0000Sz-Fh for help-gnu-emacs@gnu.org; Tue, 07 Jul 2009 02:36:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MO4HW-0000ID-Om for help-gnu-emacs@gnu.org; Tue, 07 Jul 2009 02:36:03 -0400 Original-Received: from [199.232.76.173] (port=37889 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MO4HW-0000HW-I8 for help-gnu-emacs@gnu.org; Tue, 07 Jul 2009 02:35:58 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:59759 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MO4HV-0002dA-UL for help-gnu-emacs@gnu.org; Tue, 07 Jul 2009 02:35:58 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MO4HS-0001Kl-KO for help-gnu-emacs@gnu.org; Tue, 07 Jul 2009 06:35:54 +0000 Original-Received: from c-67-190-36-32.hsd1.co.comcast.net ([67.190.36.32]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Jul 2009 06:35:54 +0000 Original-Received: from kevin.d.rodgers by c-67-190-36-32.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Jul 2009 06:35:54 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 58 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-67-190-36-32.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) In-Reply-To: <24345123.post@talk.nabble.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:65809 Archived-At: This is a multi-part message in MIME format. --------------040205080107010104030207 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Nobuko Three wrote: > I open a file foo.txt and then my emacs displays the message: > > foo.txt has auto save data; consider M-x recover-this-file > > in the echo area, but the message rarely catches my attention because I > quickly start editing the file and that makes the message disappear before I > notice it. > > Normally after emacs is crashed, you know you need to use M-x > recover-session, but it could happen that you go to lunch after crash, you > come back, you start emacs again, you forget to do recover-session and open > foo.bar and then also miss the "foo.txt has auto save data..." message. > > How do you deal with this problem? > > One idea is to make emacs change its background color whenever it echoes > such message. Even if you miss the message, you will always notice the > changed background color which reminds you to check the *Message* buffer. > > Is there a hook I can use for this idea? Here's a start (recover-this-file-find-file-hook.el attached). -- Kevin Rodgers Denver, Colorado, USA --------------040205080107010104030207 Content-Type: application/emacs-lisp; name="recover-this-file-find-file-hook.el" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="recover-this-file-find-file-hook.el" KGRlZmZhY2UgcmVjb3Zlci10aGlzLWZpbGUKICAnKCh0IDpiYWNrZ3JvdW5kICJvcmFuZ2Ui KSkKICAiRmFjZSBmb3IgYnVmZmVycyB2aXNpdGluZyBmaWxlcyB3aXRoIGF1dG8gc2F2ZSBk YXRhLiIKICA6Z3JvdXAgJ2ZpbGVzKQoKKGRlZnZhciByZWNvdmVyLXRoaXMtZmlsZSBuaWwK ICAiSWYgbm9uLW5pbCwgYW4gb3ZlcmxheSBpbmRpY2F0aW5nIHRoYXQgdGhlIHZpc2l0ZWQg ZmlsZSBoYXMgYXV0byBzYXZlIGRhdGEuIikKCihkZWZ1biByZWNvdmVyLXRoaXMtZmlsZS1m aW5kLWZpbGUtaG9vayAoKQogIDs7IHNlZSBhZnRlci1maW5kLWZpbGUKICAobGV0ICgod2Fy biAobm90IGJ1ZmZlci1yZWFkLW9ubHkpKSkKICAgICh3aGVuIChhbmQgd2FybgoJICAgICAg IDs7IE5vIG5lZWQgdG8gd2FybiBpZiBidWZmZXIgaXMgYXV0by1zYXZlZAoJICAgICAgIDs7 IHVuZGVyIHRoZSBuYW1lIG9mIHRoZSB2aXNpdGVkIGZpbGUuCgkgICAgICAgKG5vdCAoYW5k IGJ1ZmZlci1maWxlLW5hbWUKCQkJIGF1dG8tc2F2ZS12aXNpdGVkLWZpbGUtbmFtZSkpCgkg ICAgICAgKGZpbGUtbm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