From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Matt Muggeridge" Newsgroups: gmane.emacs.help Subject: Re: Autosave and filename too long Date: Fri, 01 Nov 2002 01:48:53 GMT Organization: Hewlett-Packard Company Sender: help-gnu-emacs-admin@gnu.org Message-ID: <94lw9.52$qm4.1695775@news.cpqcorp.net> References: <_DOt9.20721$DP6.65383@news-server.bigpond.net.au> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1036116594 30278 80.91.224.249 (1 Nov 2002 02:09:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 1 Nov 2002 02:09:54 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 187RFx-0007sE-00 for ; Fri, 01 Nov 2002 03:09:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 187RCD-00049K-00; Thu, 31 Oct 2002 21:06:01 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!news.compaq.com!news.cpqcorp.net!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 79 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Original-NNTP-Posting-Host: 16.176.234.23 Original-X-Complaints-To: abuse@Compaq.com Original-X-Trace: news.cpqcorp.net 1036115333 16.176.234.23 (Thu, 31 Oct 2002 17:48:53 PST) Original-NNTP-Posting-Date: Thu, 31 Oct 2002 17:48:53 PST Original-Xref: shelby.stanford.edu gnu.emacs.help:106635 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:3185 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3185 Just a quick update. Today I had the unfortunate situation of losing my connection mid-edits. After reestablishing my environment and then opening the file, emacs did automatically detect I had unsaved edits and prompted me to use recover-file. I did this, and it recovered the autosave filename. All in all, I'm a happy camper - Thanks Michael! I guess my attempt to test recovery before was not quite accurate. When it really counted, it worked! Matt. "Michael Slass" wrote in message news:m365vr22ak.fsf@localhost.localdomain... > >> "Matt Muggeridge" writes: > >> > >> I would like to try changing the "#" character to learn if it makes > >> a difference. > >> > >> Thanks, > >> Matt. > >> > >> > >>"Michael Slass" wrote in message > >>news:m33cqwqufe.fsf@localhost.localdomain... > >> > >> (defadvice make-auto-save-file-name (after auto-save-remove-hash-mark ()) > >> "return an autosave file name, replacing \"#\" with \"OCTOTHORPE\"" > >> (setq ad-return-value > >> (replace-regexp-in-string "#" "OCTOTHORPE" ad-return-value))) > >> > >> (ad-activate 'make-auto-save-file-name) > >> > >> > >> (defun auto-save-file-name-p (filename) > >> "Return non-nil if FILENAME can be yielded by `make-auto-save-file-name'. > >> FILENAME should lack slashes. You can redefine this for customization." > >> (string-match "^OCTOTHORPE.*OCTOTHORPE$" filename)) > > > "Matt Muggeridge" writes: > > >Michael, > > > >Thanks for making the octothorpe go away! The auto-save feature is now > >working. > > > >On to the next hurdle... > > > >The recover feature of emacs is still searching for files of name #foo.c#. > >So after a quick test, I tried to recover foo.c (I first verifed the > >contents of "OCTOTHORPEfoo.cOCTOTHORPE" existed and contained 'lost' edits). > >The recover operation complained with: > > > > Auto-save file /usr/users/muggerid/kingsx/#foo.c# not current > > > >Now that auto-save is working, what is needed to make recover aware of this > >new auto-save file name format? > > > >Matt. > > > Hmmm... I'm not sure why that is, since recover-file uses > make-auto-save-file-name to generate the recovery file name, so it > should match. I'll keep looking at it, but perhaps one of the gurus > might have an idea? > > -- > Mike Slass