all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [iam-est-hora-surgere@despammed.com: saveplace.el broken in CVS Emacs?]
@ 2004-06-05 13:49 Richard Stallman
  2004-06-05 18:26 ` Karl Fogel
  2004-06-05 18:48 ` saveplace.el broken in CVS Emacs? Karl Fogel
  0 siblings, 2 replies; 9+ messages in thread
From: Richard Stallman @ 2004-06-05 13:49 UTC (permalink / raw)


Could someone please investigate and fix this?

------- Start of forwarded message -------
X-Injected-Via-Gmane: http://gmane.org/
Mail-Followup-To: emacs-pretest-bug@gnu.org
To: emacs-pretest-bug@gnu.org
From: Marcus Frings <iam-est-hora-surgere@despammed.com>
Date: Thu, 03 Jun 2004 20:46:15 +0200
Organization: Schismatrix
X-Gmane-NNTP-Posting-Host: pd95f863b.dip.t-dialin.net
X-PGP-Key: 0xE10F502E (DH/DSS)
X-PGP-Fingerprint: 53FC 5A87 27BE 1D30 FEB4 861A 948F D6A0 E10F 502E
Mail-Copies-To: nobody
Cancel-Lock: sha1:ji6sZ7XrLo1ErUnILFyWq9jsIe4=
Subject: saveplace.el broken in CVS Emacs?
Reply-To: protagonist@gmx.net
Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
X-Spam-Status: No, hits=0.0 required=5.0
	tests=RCVD_IN_ORBS,USER_AGENT_GNUS_UA
	version=2.55
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)

Hello,

recently I installed a CVS Emacs on my Debian box but whenever I want to
leave Emacs with C-x C-c I get:

save-place-alist-to-file: Wrong type argument: listp, \.\.\.

The backtrace says:

Debugger entered--Lisp error: (wrong-type-argument listp \.\.\.)
  save-place-forget-unreadable-files()
  save-place-alist-to-file()
  save-place-kill-emacs-hook()
  run-hooks(kill-emacs-hook)
  kill-emacs()
  save-buffers-kill-emacs(nil)
  call-interactively(save-buffers-kill-emacs)

My settings are

(require 'saveplace)
(setq-default save-place t)

and these work fine for Emacs 21.3.

Regards,
Marcus
- -- 
"anger thought so no thought touched inside crazy
(disembodied guttural noise need not make sense)"



_______________________________________________
Emacs-pretest-bug mailing list
Emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

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

* Re: [iam-est-hora-surgere@despammed.com: saveplace.el broken in CVS Emacs?]
  2004-06-05 13:49 [iam-est-hora-surgere@despammed.com: saveplace.el broken in CVS Emacs?] Richard Stallman
@ 2004-06-05 18:26 ` Karl Fogel
  2004-06-05 18:48 ` saveplace.el broken in CVS Emacs? Karl Fogel
  1 sibling, 0 replies; 9+ messages in thread
From: Karl Fogel @ 2004-06-05 18:26 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:
> Could someone please investigate and fix this?

I will investigate this.

-Karl


> From: Marcus Frings <iam-est-hora-surgere@despammed.com>
> Subject: saveplace.el broken in CVS Emacs?
> To: emacs-pretest-bug@gnu.org
> Date: Thu, 03 Jun 2004 20:46:15 +0200
> Organization: Schismatrix
> Mail-Copies-To: nobody
> Reply-To: protagonist@gmx.net
> 
> Hello,
> 
> recently I installed a CVS Emacs on my Debian box but whenever I want to
> leave Emacs with C-x C-c I get:
> 
> save-place-alist-to-file: Wrong type argument: listp, \.\.\.
> 
> The backtrace says:
> 
> Debugger entered--Lisp error: (wrong-type-argument listp \.\.\.)
>   save-place-forget-unreadable-files()
>   save-place-alist-to-file()
>   save-place-kill-emacs-hook()
>   run-hooks(kill-emacs-hook)
>   kill-emacs()
>   save-buffers-kill-emacs(nil)
>   call-interactively(save-buffers-kill-emacs)
> 
> My settings are
> 
> (require 'saveplace)
> (setq-default save-place t)
> 
> and these work fine for Emacs 21.3.
> 
> Regards,
> Marcus
> - -- 
> "anger thought so no thought touched inside crazy
> (disembodied guttural noise need not make sense)"
> 
> 
> 
> _______________________________________________
> Emacs-pretest-bug mailing list
> Emacs-pretest-bug@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
> ----------
> 
> 
> 
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: saveplace.el broken in CVS Emacs?
  2004-06-05 13:49 [iam-est-hora-surgere@despammed.com: saveplace.el broken in CVS Emacs?] Richard Stallman
  2004-06-05 18:26 ` Karl Fogel
@ 2004-06-05 18:48 ` Karl Fogel
  2004-06-06 12:27   ` Marcus Frings
  1 sibling, 1 reply; 9+ messages in thread
From: Karl Fogel @ 2004-06-05 18:48 UTC (permalink / raw)
  Cc: emacs-devel

Marcus Frings wrote:
> recently I installed a CVS Emacs on my Debian box but whenever I want to
> leave Emacs with C-x C-c I get:
> 
> save-place-alist-to-file: Wrong type argument: listp, \.\.\.
> 
> The backtrace says:
> 
> Debugger entered--Lisp error: (wrong-type-argument listp \.\.\.)
>   save-place-forget-unreadable-files()
>   save-place-alist-to-file()
>   save-place-kill-emacs-hook()
>   run-hooks(kill-emacs-hook)
>   kill-emacs()
>   save-buffers-kill-emacs(nil)
>   call-interactively(save-buffers-kill-emacs)
> 
> My settings are
> 
> (require 'saveplace)
> (setq-default save-place t)
> 
> and these work fine for Emacs 21.3.

Hi Marcus.  I'm unable to reproduce this with the latest CVS Emacs.  I
put your settings

   (require 'saveplace)
   (setq-default save-place t)

into a file 'foo.el', and ran

   emacs --geometry=80x30 -q -l foo.el &

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

I also tried exiting having visited no buffers, and exiting after
having visited some buffers (so there would be places to save).  When
there were places to save, they were always saved correctly.

So, I'd like some more information from you.  Can you reproduce the
problem reliably?  If so, what's the minimal Emacs session that
reproduces it?  For example, can you do it just by starting Emacs and
then exiting, without visiting any buffers?  Can you do it by starting
"emacs -q", then evaluating your settings by hand, then exiting?

And, what are the contents of your ~/.emacs-places file?  Your .emacs
file might help as well.

Thank you,
-Karl Fogel

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

* Re: saveplace.el broken in CVS Emacs?
  2004-06-05 18:48 ` saveplace.el broken in CVS Emacs? Karl Fogel
@ 2004-06-06 12:27   ` Marcus Frings
  2004-06-07  5:49     ` Karl Fogel
  0 siblings, 1 reply; 9+ messages in thread
From: Marcus Frings @ 2004-06-06 12:27 UTC (permalink / raw)


Hi Karl,

thanks for taking care of this issue.

* Karl Fogel <kfogel@floss.red-bean.com> wrote:
> Marcus Frings wrote:

>> save-place-alist-to-file: Wrong type argument: listp, \.\.\.

> Hi Marcus.  I'm unable to reproduce this with the latest CVS Emacs.  I
> put your settings

>    (require 'saveplace)
>    (setq-default save-place t)

> into a file 'foo.el', and ran

>    emacs --geometry=80x30 -q -l foo.el &

Well, I'm able to reproduce this behaviour with this minimalist setup.

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

By the way, I'm also reading the mailing list via gmane.org now.

Regards,
Marcus
-- 
"To call up a demon you must learn its name. Men dreamed that, once, but now it
is real in another way. You know that, Case. Your business is to learn the names
of programs, the long formal names, names the owners seek to conceal. True
names ..." - "A Turing code's not your name." - "Neuromancer", the boy said.

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

* Re: saveplace.el broken in CVS Emacs?
  2004-06-06 12:27   ` Marcus Frings
@ 2004-06-07  5:49     ` Karl Fogel
  2004-06-07 12:16       ` Kai Grossjohann
  2004-06-08 11:47       ` Marcus Frings
  0 siblings, 2 replies; 9+ messages in thread
From: Karl Fogel @ 2004-06-07  5:49 UTC (permalink / raw)
  Cc: Marcus Frings

Marcus Frings <iam-est-hora-surgere@despammed.com> 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:

   ((FILENAME . POSN) (FILENAME . POSN) \.\.\.)

...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  <s11@member.fsf.org>

     * 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 (texinfo-insert-@item): Look for the
     current Texinfo environment, using the same method as in
     `texinfo-insert-@end', 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.

Thanks,
-Karl

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

* Re: saveplace.el broken in CVS Emacs?
  2004-06-07  5:49     ` Karl Fogel
@ 2004-06-07 12:16       ` Kai Grossjohann
  2004-06-07 18:10         ` Karl Fogel
  2004-06-08 11:47       ` Marcus Frings
  1 sibling, 1 reply; 9+ messages in thread
From: Kai Grossjohann @ 2004-06-07 12:16 UTC (permalink / raw)


Karl Fogel <kfogel@floss.red-bean.com> writes:

> 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:
>
>    ((FILENAME . POSN) (FILENAME . POSN) \.\.\.)
>
> ...though there were many more (FILENAME . POSN) pairs of course.

There was a time when print (and related functions) started to elide
parts of lists.  To see this, eval load-path in *scratch*.

But save-place doesn't appear to use print.

Kai

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

* Re: saveplace.el broken in CVS Emacs?
  2004-06-07 12:16       ` Kai Grossjohann
@ 2004-06-07 18:10         ` Karl Fogel
  2004-06-08 11:32           ` Marcus Frings
  0 siblings, 1 reply; 9+ messages in thread
From: Karl Fogel @ 2004-06-07 18:10 UTC (permalink / raw)
  Cc: Marcus Frings, emacs-devel

Kai Grossjohann <kai@emptydomain.de> writes:
> There was a time when print (and related functions) started to elide
> parts of lists.  To see this, eval load-path in *scratch*.
> 
> But save-place doesn't appear to use print.

Aha, that must be it.  Thank you.  (It does use 'print', actually, in
'save-place-alist-to-file').

I'll fix it with this:

   (let ((print-length nil)
         (print-level nil))
     (print ... ))

...so that the code will be safe even if save-place-alist's structure
someday changes to become more nesty (which I doubt, but why take a
chance?).

-Karl

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

* Re: saveplace.el broken in CVS Emacs?
  2004-06-07 18:10         ` Karl Fogel
@ 2004-06-08 11:32           ` Marcus Frings
  0 siblings, 0 replies; 9+ messages in thread
From: Marcus Frings @ 2004-06-08 11:32 UTC (permalink / raw)


* Karl Fogel <kfogel@floss.red-bean.com> wrote:

> Aha, that must be it.  Thank you.  (It does use 'print', actually, in
> 'save-place-alist-to-file').
> I'll fix it with this:

Thank you very much for solving this issue! I checked out from CVS some
minutes ago and saw your fix in the code. Right now I'm compiling Emacs
again.

Regards,
Marcus
-- 
"The sun shines on the aluminium
I guess this must be the home of the hitmen"

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

* Re: saveplace.el broken in CVS Emacs?
  2004-06-07  5:49     ` Karl Fogel
  2004-06-07 12:16       ` Kai Grossjohann
@ 2004-06-08 11:47       ` Marcus Frings
  1 sibling, 0 replies; 9+ messages in thread
From: Marcus Frings @ 2004-06-08 11:47 UTC (permalink / raw)


* Karl Fogel <kfogel@floss.red-bean.com> wrote:
> Marcus Frings <iam-est-hora-surgere@despammed.com> writes:

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

Ah, okay.

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

[Very detailed explanation snapped off, thanks a lot for explaining it
very well!]

Yes, you are right, this sequence of "\.\.\." at the end of
~/.emacs-places causes the trouble. After deleting it manually
everything is working fine again now.

> 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

I really have no idea how could this have happened because I have never
opened ~/.emacs-places into an editor. Could a crash of Emacs maybe
manipulate this file?

> you can reproduce this reliably even after fixing your .emacs-places,
> then we'll be able to trace it.

Well, the problem seems to be gone now as I removed the stuff at the end
of the file. If it ever happens again somehow I'll let you know!

Thank you for your help!

Regards,
Marcus
-- 
"Priorität: Sicherstellung des Fremdorganismus zu Analysezwecken.
Alle anderen Belange sekundär. Besatzung ersetzbar." 

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

end of thread, other threads:[~2004-06-08 11:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-05 13:49 [iam-est-hora-surgere@despammed.com: saveplace.el broken in CVS Emacs?] Richard Stallman
2004-06-05 18:26 ` Karl Fogel
2004-06-05 18:48 ` saveplace.el broken in CVS Emacs? Karl Fogel
2004-06-06 12:27   ` Marcus Frings
2004-06-07  5:49     ` Karl Fogel
2004-06-07 12:16       ` Kai Grossjohann
2004-06-07 18:10         ` Karl Fogel
2004-06-08 11:32           ` Marcus Frings
2004-06-08 11:47       ` Marcus Frings

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.