[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
`command-history'.
[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'.]
The attached patch fixes this and the other problems that I noted earlier
(and it does not remove text properties).
HTH - Drew
savehist-2007-09-09b.patch
Description: Binary data
- 23.0.50; savehist save invalid syntax, Leo, 2007/09/02
- RE: 23.0.50; savehist save invalid syntax, Drew Adams, 2007/09/02
- Re: 23.0.50; savehist save invalid syntax, Richard Stallman, 2007/09/02
- Re: 23.0.50; savehist save invalid syntax, Davis Herring, 2007/09/04
- Re: 23.0.50; savehist save invalid syntax, Stefan Monnier, 2007/09/04
- Re: 23.0.50; savehist save invalid syntax, Richard Stallman, 2007/09/05
- Re: 23.0.50; savehist save invalid syntax, Davis Herring, 2007/09/05
- Re: 23.0.50; savehist save invalid syntax, Richard Stallman, 2007/09/06
- RE: 23.0.50; savehist save invalid syntax, Drew Adams, 2007/09/09
- Re: 23.0.50; savehist save invalid syntax, Andreas Schwab, 2007/09/09
- RE: 23.0.50; savehist save invalid syntax,
Drew Adams <=
- RE: 23.0.50; savehist save invalid syntax, Drew Adams, 2007/09/09
- RE: 23.0.50; savehist save invalid syntax, Davis Herring, 2007/09/10
- RE: 23.0.50; savehist save invalid syntax, Drew Adams, 2007/09/10
- Re: 23.0.50; savehist save invalid syntax, Richard Stallman, 2007/09/10
- Re: 23.0.50; savehist save invalid syntax, Davis Herring, 2007/09/11
- RE: 23.0.50; savehist save invalid syntax, Davis Herring, 2007/09/10
- RE: 23.0.50; savehist save invalid syntax, Drew Adams, 2007/09/10
- RE: 23.0.50; savehist save invalid syntax, Davis Herring, 2007/09/10
- Re: 23.0.50; savehist save invalid syntax, Stefan Monnier, 2007/09/10
- Re: [Released] Re: 23.0.50; savehist save invalid syntax, Davis Herring, 2007/09/11