[Top][All Lists]

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

Re: Saving minibuffer history

From: Hrvoje Niksic
Subject: Re: Saving minibuffer history
Date: Tue, 25 Oct 2005 11:46:55 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> It [...] introduces savehist-mode, which would become the main
> advertized way to turn the feature ON (can also be done via
> Customize) in place of savehist-load.

I'm not sure that's a good idea.  savehist-load replaces existing
minibuffer histories with the loaded ones, which is why it is
recommended to only call it from `.emacs'.  Since turning on a
savehist mode calls `savehist-load', it has the nasty side effect of
ruining existing minibuffer histories.  This is alleviated by the use
of `savehist-loaded', but it will still ruin the minibuffer histories
when savehist is first run.

savehist is IMO not a good candidate for a minor mode because turning
it on and off during an Emacs session does not make much sense.  Also
note that XEmacs doesn't support `define-minor-mode', so it would
complexify the code.

> There are also minor changes: don't save empty histories, and try to
> avoid computing the checksum when no minibuffer input occurred since
> last check.

That breaks savehist-additional-variables.  Not saving empty
minibuffer histories does not buy us much, now that we only save the
histories that have actually been used at least once.  And it would
also break savehist-additional-variables when the intent is to save a
nil variable.

I thought of removing the savehist-additional-variables feature
(unlike in 1997, you can save options using Customize now), but it
still seems the best way to persist modifiable variables like

reply via email to

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