Yoshiki> Of course you can avoid this by calling save-some-buffers
Yoshiki> but IMHO it should no be toggled in one session. It should
Yoshiki> persist one session or you'll end up with a lot of .save-*
Yoshiki> files left around after several sessions.
In light of this fact, I would agree you might not want to add
my changes... however should probably add a comment to the
definition for auto-save-list-file-prefix to the effect:
"This option should only be set once per session, preferably
in the user's initialization file. If it is set any time
later in the session, it may produce unpredictable behavior
with auto-save and session-recover."
This would hopefully help (most) others avoid falling into the trap that
Steve discovered.
The approach being:
If we can't fix it through code, try to fix it through user-education...
BTW, thanks for the feedback on the lisp. I truly am a novice, and like
to learn better ways of doing things.
Troy
-----Original Message-----
From: Yoshiki Hayashi [mailto:yoshikiï¼ xemacs.org]
Sent: Wednesday, October 25, 2000 10:41 PM
To: Troy Noble
Cc: Steve Youngs; XEmacs beta; 'Adrian Aichner'
Subject: Re: auto-save-list-file-name
Troy Noble <troy.noble(a)channelpoint.com> writes:
Yoshiki,
You need to change:
+ (if auto-save-list-file-name
to
+ (if auto-save-list-file-prefix
Oops. Thanks! I'll post a fixed version to xemacs-patches.
Too many errors in one day...
Your patch addresses the problem if the auto-save-list-file-prefix
is
set in the user's initialization file. If they later toggle
auto-save-list-file-prefix to nil (like Steve did), the
auto-save-list-file-name will still be set to the value to which it was
initialized in normal-top-level unless the user also sets
auto-save-list-file-name to nil.
That's the second half of the problem Steve was alluding to I
believe.
Actually, I don't see it as a problem. Rather I think it
is a feature. The problematic example is:
1. Create a new file e.g. test and it is auto
saved. This will create #test# and ~/.saves-foo.
2. Then set auto-save-list-file-name to nil.
3. Save test or kill that buffer. This will remove #test#
but it won't remove ~/.save-foo because there's no way
XEmacs can know what was the auto-save list file.
Of course you can avoid this by calling save-some-buffers
but IMHO it should no be toggled in one session. It should
persist one session or you'll end up with a lot of .save-*
files left around after several sessions.
------------------------------ snip