emacs-devel
[Top][All Lists]
Advanced

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

Re: [External] : Turning on savehist-mode by default


From: Eli Zaretskii
Subject: Re: [External] : Turning on savehist-mode by default
Date: Sun, 19 Nov 2023 11:24:34 +0200

> From: Yuri Khan <yuri.v.khan@gmail.com>
> Date: Sun, 19 Nov 2023 16:06:17 +0700
> Cc: juri@linkov.net, drew.adams@oracle.com, philipk@posteo.net, 
>       sbaugh@catern.com, emacs-devel@gnu.org
> 
> On Sun, 19 Nov 2023 at 15:26, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > > > Please don't forget there is also `desktop.el'
> > > > that is a superset of `savehist.el'
> > >
> > > Is it though? I’m using ‘desktop-save-mode’, not observing
> > > preservation of histories, and not seeing any user option in the
> > > Desktop group that would shout to me “enable this to save all
> > > histories”. I see ‘file-name-history’ in ‘desktop-globals-to-save’ but
> > > I wouldn’t like to whitelist all the histories I care about.
> >
> > Why not?
> 
> Why would I?

Because some histories you care about, whereas others you don't?
That's the situation here, FWIW.

> Histories are user data. User data is precious. Losing
> user data on a restart is a bug. (Slightly exaggerating.)

The "slightly" part is already exaggerated.

Not all histories are precious enough to save them.  They don't come
for free: you pay with memory for them, if not with longer search
times.

> I can see three reasons for *not* saving histories: (1) risk of
> information disclosure if sensitive data such as passwords is stored
> in histories; (2) reduced startup performance if too much history gets
> accumulated; and (3) cross-process interference if the application is
> typically running in multiple instances. (1) is solved by a blacklist
> (opt-out for a few specific histories), (2) by pruning saved histories
> to some configurable maximum depth, and (3) by saying Emacs is not
> typically used like that[citation needed].

Well, I think you just explained why whitelisting history variables,
and thus using desktop.el for that, is not such an outlandish idea.

One other argument for using desktop.el is if you already use it for
its other features.

> > I do precisely that, FWIW.  It's a one-time configuration,
> > so not a lot of effort.
> 
> It’s only a one-time configuration if your workflow is constant. If I
> start using a feature I had not been using previously, its histories
> will initially not be saved, and I’ll have to interrupt my work and
> amend my configuration. So it’s a recurring cost.

If you start using new features frequently enough, you haven't been
using Emacs long enough ;-)

Let's agree to disagree about the advantages and disadvantages of
whitelisting vs blacklisting.  Basically, both serve the same purpose,
so the decision which one to use depends on the length of the white
list vs the black list.  Which means either method is fine, and
there's no need to represent the other choice as something completely
senseless.



reply via email to

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