[Top][All Lists]

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

RE: 23.0.50; savehist save invalid syntax

From: Drew Adams
Subject: RE: 23.0.50; savehist save invalid syntax
Date: Sun, 9 Sep 2007 20:01:37 -0700

> > 1. The most common problem I've run into here is that
> > strings with text properties are printed so that they
> > cannot be read - for example:
> > #("foobar" 0 6 (face font-lock-comment-face)).
> That string can be read back just fine.

Hmm, you're right. It must have been something else with # that was
sometimes getting into my saved histories and provoking a load error. But
what's odd is that deleting those strings seemed to remove the error. Oh
well, I must have missed something along the way.

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.

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

[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

The attached patch fixes this and the other problems that I noted earlier
(and it does not remove text properties).

HTH - Drew

Attachment: savehist-2007-09-09b.patch
Description: Binary data

reply via email to

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