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: Thu, 24 Oct 2002 08:59:38 GMT Organization: Hewlett Packard Corporation (OpenVMS TCP/IP Engineering) Sender: help-gnu-emacs-admin@gnu.org Message-ID: <_DOt9.20721$DP6.65383@news-server.bigpond.net.au> References: Reply-To: "Matt Muggeridge" NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1035450316 9539 80.91.224.249 (24 Oct 2002 09:05:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 24 Oct 2002 09:05:16 +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 184dvW-0002Tj-00 for ; Thu, 24 Oct 2002 11:05:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 184dro-0000Ku-00; Thu, 24 Oct 2002 05:01:24 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!news.stealth.net!news.stealth.net!intgwpad.nntp.telstra.net!news.telstra.net!news-server.bigpond.net.au!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 70 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: 203.45.232.23 Original-X-Complaints-To: news@bigpond.net.au Original-X-Trace: news-server.bigpond.net.au 1035449978 203.45.232.23 (Thu, 24 Oct 2002 18:59:38 EST) Original-NNTP-Posting-Date: Thu, 24 Oct 2002 18:59:38 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:106327 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:2877 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2877 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. "Michael Slass" wrote in message news:m33cqwqufe.fsf@localhost.localdomain... > "Matt Muggeridge" writes: > > >Hi, > > > >My auto-save fails with the error: > > > > Auto-saving foo.c: Opening output file, file name too long: > >/usr/users/muggerid/kingsx/#foo.c# > > > >That is a filename of just 34 characters. My suspicion is that the '#' > >character is causing me problems, since "kingsx" is a mount point, which > >mount a VMS filesystem. In lieu of any other suggestions on how to fix > >this, I would like to try changing the "#" character to learn if it makes a > >difference. > > > >Thanks, > >Matt. > > > (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)) > > > > This advice will change "#" to "OCTOTHORPE" in the > auto-save-file-name, so you'll get save files like > /usr/users/muggerid/kingsx/OCTOTHORPEfoo.cOCTOTHORPE > > That's much longer than you had, but doesn't contain the "#" > character, so you'll know right away if that was the culprit. > > I've redefined auto-save-file-name-p (which you're allowed to do) so > that you can recover these auto-save-files. > -- > Mike Slass