[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: savehist-mode: invalid-read-syntax "#"
From: |
Reiner Steib |
Subject: |
Re: savehist-mode: invalid-read-syntax "#" |
Date: |
Wed, 04 Jan 2006 20:59:11 +0100 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
On Wed, Jan 04 2006, David Kastrup wrote:
> Juri Linkov <address@hidden> writes:
>
>>> Alas, from time to time `savehist-mode' saves entries containing "#"
>>
>> Perhaps Emacs should provide a general purpose function (like
>> `desktop-value-to-string') to print Lisp-readable expressions.
>
> You can't make buffers, windows, overlays, yes even markers
> "Lisp-readable".
Mentioning "markers" reminds me of another failure when reading the
history file. I had the following entry in ~/.emacs.d/history (I
didn't C&P in which variable it was) after editing entries in my BBDB:
(bbdb-insert-new-field '["J..." "H..." ("J H...") nil
(["Home" "NNNNN/NNNNN"] ["Office" "NNNNN/NNNNNN"] ["Mobile" "0"])
(["Home" ("...weg N") "...." "" "NNNNN" ""])
("address@hidden" "address@hidden")
((gnokii . "t") (birthday . "NNNN-NN-NN")
(www . "http://www.invalid.invalid/") (category . "...")
(creation-date . "NNNN-NN-NN") (timestamp . "NNNN-NN-NN"))
["J... H..." nil #<marker at 22775 in rs.bbdb> nil]]
'phone '["Mobile" "0"])
> They are just not restorable by the Lisp reader and so one should
> find out what causes them to be in the history in the first place.
AFAICS, it's the following code...
(defun savehist-install ()
"Hook savehist into Emacs.
Normally invoked by calling `savehist-mode' to set the minor mode.
Installs `savehist-autosave' in `kill-emacs-hook' and on a timer. To
undo this, call `savehist-uninstall'."
(add-hook 'minibuffer-setup-hook 'savehist-minibuffer-hook)
[...]
(defun savehist-minibuffer-hook ()
;; XEmacs sets minibuffer-history-variable to t to mean "no history
;; is being recorded".
(unless (eq minibuffer-history-variable t)
(add-to-list 'savehist-minibuffer-history-variables
minibuffer-history-variable)))
Maybe there should be a list (say `savehist-ignores-variables') which
should contain `command-history' (and maybe other variables).
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
Re: savehist-mode: invalid-read-syntax "#", Richard M. Stallman, 2006/01/04
Re: savehist-mode: invalid-read-syntax "#", Hrvoje Niksic, 2006/01/04