emacs-devel
[Top][All Lists]
Advanced

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

RE: 23.0.50; savehist save invalid syntax


From: Davis Herring
Subject: RE: 23.0.50; savehist save invalid syntax
Date: Mon, 10 Sep 2007 15:11:40 -0700 (PDT)
User-agent: SquirrelMail/1.4.8-6.el3.2lanl

> I looked a bit closer at the rest as well, and I think that
> `savehist-prin1-readable' needs to actually read what it prints (like it
> did
> before Davis's patch). It should raise an error (hence remove the written
> entry and return nil) if either the write or the read fails.

I'm not sure if you're saying it should try reading because of the Emacs
20 bug you're about to describe, or because you don't know (having written
this before my reply to your previous mail) that printing now raises an
error if the read would fail.

> Emacs 20 serves as a good test for this, because it has a bug: If you do
> `M-x cancel-debug-on-entry RET', then Emacs 20 inserts this invalid entry
> in
> the `command-history': (cancel-debug-on-entry ') - note the quote mark
> before the right paren. This provoked a read error at load time, but the
> attached patch correctly does not include that invalid entry in the saved
> `command-history'.

I happen to have a copy of Emacs 20 handy: it seems that that expression
is (cancel-debug-on-entry (quote)).  In Emacs 20, `pp' printed that
erroneously, but `prin1' and friends printed that bogus expression
correctly.  So there are two bugs (whatever put that disembodied quote
into `command-history', and `pp'), but I don't see the relevance to
savehist, especially since the signaling print on which I made it rely
will never exist in Emacs 20.

> [savehist.el does not actually work with Emacs 20, for other reasons (e.g.
> md5), but I have a version that does work, and I used that to test
> `savehist-prin1-readable'.]

What I just said about signaling prints should explain your test results,
although I don't know how you got savehist to attempt to read output from
`pp'.  Feel free to keep the print/read trick for Emacs 20, of course!

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.




reply via email to

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