Subject: bug#445: Invalid read syntax in savehist-mode's history file

From: "Drew Adams" <[email-masked]>
Date: Mon, 18 Aug 2008 14:24:52 -0700

>  > AFAIK, savehist-mode doesn't save command-history.  Please 
>  > provide a recipe for reproducing this bug.
> 
> The comment below seems to contradict this
>    (defcustom savehist-ignored-variables nil ;; '(command-history)
> but I'm a stranger here.

Yes, you need a recipe and knowledge of the user's savehist variables. It's
likely that 
`savehist-save-hook' added `command-history' to
`savehist-minibuffer-history-variables'. That is the default behavior (and a
good one), since `savehist-ignored-variables' is nil by default.

Another, less likely possibility is that `command-history' was included in
`savehist-additional-variables' or `savehist-save-minibuffer-history'.

My own values, FWIW:

`savehist-additional-variables' is (search-ring regexp-search-ring)

`savehist-save-minibuffer-history' is t

`savehist-minibuffer-history-variables' is automatically set to:
(color-theme-history iswitchb-history icicle-face-name-history find-tag-history
icicle-doc-history junk-ring woman-file-history woman-topic-history
icicle-command-abbrev-history ediff-url-read-url-history grep-find-history
variable-name-history widget-function-prompt-value-history
icicle-font-name-history hi-lock-face-history hi-lock-regexp-history
shell-command-history icicle-search-replacement-history
icicle-function-name-history face-name-history icicle-function-history
icicle-text-property-value-history icicle-dictionary-history icicle-kill-history
icicle-color-theme-history icicle-bookmark-history icicle-kmacro-history
icicle-buffer-config-history icicle-search-history icicle-completion-set-history
frame-name-history comint-input-ring dired-shell-command-history
imenu--history-list compile-history Info-search-history search-ring
dired-regexp-history info-lookup-history coding-system-history synonyms-history
icicle-thesaurus-history input-method-history minibuffer-history-search-history
bookmark-history set-any-variable-value-history yes-or-no-p-history
set-variable-value-history query-replace-history grep-history
read-expression-history buffer-name-history command-history regexp-history
file-name-history minibuffer-history extended-command-history)

As you can see, `command-history' was automatically added to
`savehist-minibuffer-history-variables' (because
`savehist-save-minibuffer-history' is t).