[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: saveplace.el broken in CVS Emacs?

From: Karl Fogel
Subject: Re: saveplace.el broken in CVS Emacs?
Date: 07 Jun 2004 00:49:02 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Marcus Frings <address@hidden> writes:
> > repeatedly.  I tried it with my own non-empty ~/.emacs-places file,
> > and with no ~/.emacs-places file, and also with a ~/.emacs-places
> > containing only "nil" (well, "\n\nnil\n", because that's what
> > saveplace.el writes when there are no places to record).  
> Good news are that I have found out that my ~/.emacs-places seems to be
> broken for CVS Emacs but works with the regular Emacs 21.3.

I got your .emacs-places by private mail, thanks, and can reproduce
the bug by using it as my own .emacs-places.

However, I'm baffled as to how that file got the way it is.  It
contains what at first appears to be a normal-looking
'save-place-alist', but at the end is an unexpected " \.\.\.".  In
other words, your save-place-alist looked like this:


...though there were many more (FILENAME . POSN) pairs of course.

Did you at some point evaluate and reset your save-place-alist, in
some context where the tail of the list would have been elided?

I believe the reason your malformed place alist works in Emacs 21.3,
but not in CVS Emacs, is that CVS Emacs now has the
'save-place-forget-unreadable-files' functionality, added in February:

   2004-02-21  Stephen Compall  <address@hidden>

     * saveplace.el (save-place-forget-unreadable-files)
     (save-place-save-skipped, save-place-skip-check-regexp): New vars.
     (save-place-forget-unreadable-files): New function.
     (save-place-alist-to-file): Use it to filter out files that are
     no longer readable.

     * textmodes/texinfo.el (address@hidden): Look for the
     current Texinfo environment, using the same method as in
     address@hidden', and insert a space rather than a newline if
     point in a @table environment.

The important thing about this change is that each individual element
of save-place-alist is now evaluated as the list is saved.  The code
naturally expects each element to be a pair; when it encountered the
"\.\.\.", that assumption failed.

However, I doubt this is a bug in save-place-forget-unreadable-files.
The real question is, how did your save-place-alist get to be the way
it is?  I don't see how it could have happened from the code, but if
you can reproduce this reliably even after fixing your .emacs-places,
then we'll be able to trace it.

> I have moved my original ~/.emacs-places to /tmp, opened CVS Emacs
> again, edited some files and closed the session. After starting CVS
> Emacs once more the problem disappeared because I can now leave with C-x
> C-c and also the cursor appears at the right position in the last edited
> files.
> > And, what are the contents of your ~/.emacs-places file?  Your .emacs
> > file might help as well.
> I'll send you my ~/.emacs-places via private mail. I just wonder why it
> makes CVS Emacs fail whereas it works fine with Emacs 21.3 because I
> have never opened or edited ~/.emacs-places by hand.

Hmmm.  Well, you can get your old places back by just removing that
bad bit from the end of the .emacs-places you sent me.  If you can
still make the bug happen after that, I'd like to know the recipe.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]