all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Autosave and filename too long
@ 2002-10-24  1:13 Matt Muggeridge
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Muggeridge @ 2002-10-24  1:13 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Autosave and filename too long
@ 2002-10-24  5:22 Michael Slass
  2002-10-24  8:59 ` Matt Muggeridge
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Slass @ 2002-10-24  5:22 UTC (permalink / raw)


"Matt Muggeridge" <Matt.Muggeridge@hp.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Autosave and filename too long
  2002-10-24  5:22 Autosave and filename too long Michael Slass
@ 2002-10-24  8:59 ` Matt Muggeridge
  2002-10-24 17:03   ` Michael Slass
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Muggeridge @ 2002-10-24  8:59 UTC (permalink / raw)


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" <miknrene@drizzle.com> wrote in message
news:m33cqwqufe.fsf@localhost.localdomain...
> "Matt Muggeridge" <Matt.Muggeridge@hp.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Autosave and filename too long
  2002-10-24  8:59 ` Matt Muggeridge
@ 2002-10-24 17:03   ` Michael Slass
  2002-11-01  1:48     ` Matt Muggeridge
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Slass @ 2002-10-24 17:03 UTC (permalink / raw)


>> "Matt Muggeridge" <Matt.Muggeridge@hp.com> writes:
>>
>> I would like to try changing the "#" character to learn if it makes
>> a difference.
>> 
>> Thanks,
>> Matt.
>>
>>
>>"Michael Slass" <miknrene@drizzle.com> 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" <Matt.Muggeridge@hp.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Autosave and filename too long
  2002-10-24 17:03   ` Michael Slass
@ 2002-11-01  1:48     ` Matt Muggeridge
  2002-11-01  2:23       ` Michael Slass
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Muggeridge @ 2002-11-01  1:48 UTC (permalink / raw)


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" <miknrene@drizzle.com> wrote in message
news:m365vr22ak.fsf@localhost.localdomain...
> >> "Matt Muggeridge" <Matt.Muggeridge@hp.com> writes:
> >>
> >> I would like to try changing the "#" character to learn if it makes
> >> a difference.
> >>
> >> Thanks,
> >> Matt.
> >>
> >>
> >>"Michael Slass" <miknrene@drizzle.com> 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" <Matt.Muggeridge@hp.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Autosave and filename too long
  2002-11-01  1:48     ` Matt Muggeridge
@ 2002-11-01  2:23       ` Michael Slass
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Slass @ 2002-11-01  2:23 UTC (permalink / raw)


"Matt Muggeridge" <Matt.Muggeridge@hp.com> writes:

>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.
>

Hey, that's great news.  Were the files in question on the remote
filesystem, by any chance?

-- 
Mike Slass

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-11-01  2:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-24  5:22 Autosave and filename too long Michael Slass
2002-10-24  8:59 ` Matt Muggeridge
2002-10-24 17:03   ` Michael Slass
2002-11-01  1:48     ` Matt Muggeridge
2002-11-01  2:23       ` Michael Slass
  -- strict thread matches above, loose matches on Subject: below --
2002-10-24  1:13 Matt Muggeridge

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.