[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Turning on savehist-mode by default
From: |
Eli Zaretskii |
Subject: |
Re: Turning on savehist-mode by default |
Date: |
Wed, 29 Nov 2023 14:31:04 +0200 |
> Date: Tue, 28 Nov 2023 15:07:46 -0600
> Cc: emacs-devel@gnu.org, public@thanosapollo.org
> From: Adam Porter <adam@alphapapa.net>
>
> FWIW, IME, it may not be a good idea to enable savehist-mode by default.
> As an example, see this issue report on Ement.el's repository:
>
> https://github.com/alphapapa/ement.el/issues/216
>
> The gist is that, for users who enabled savehist, it was saving the
> variable command-history, which included some complex commands whose
> arguments (from interactive completion) included large data structures
> (which are hidden from the user when called interactively). This
> resulted in savehist files hundreds of MB in size and very noticeable
> pauses whenever savehist saved its data, from timers and upon Emacs exit.
>
> The worst part was how long it took to discover the source of the
> problem. There were intermittent reports of weird pauses for months,
> without any discernible reason, until a user finally narrowed it down to
> using savehist. Then we had to add this hacky workaround in Ement to
> try to automatically avoid the problem.
>
> Such cases may be rare (or not--I can't say), but when it happens, it
> seems to be a bear to deal with, being very unintuitive. For myself,
> even having written a number of Emacs packages, I wasn't yet aware of
> the command-history variable and how it saves arguments, and certainly
> not the implications of using savehist as well.
savehist provides a customizable ability to limit the number of
history entries saved for each variable.
We could also add a new feature which limits the size of individual
entry: entries longer than that will not be saved.
Patches welcome.
- Re: Not clobbering bash history, (continued)