GNU bug report logs - #30943
save-hist creates massive cache file

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Chris Findeisen <cfindeisen@HIDDEN>; dated Sun, 25 Mar 2018 22:59:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 30943 <at> debbugs.gnu.org:


Received: (at 30943) by debbugs.gnu.org; 30 Mar 2018 08:14:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 30 04:14:37 2018
Received: from localhost ([127.0.0.1]:59332 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f1pBF-0000eS-IP
	for submit <at> debbugs.gnu.org; Fri, 30 Mar 2018 04:14:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42056)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1f1pBE-0000eG-EW
 for 30943 <at> debbugs.gnu.org; Fri, 30 Mar 2018 04:14:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1f1pB5-0001jG-DH
 for 30943 <at> debbugs.gnu.org; Fri, 30 Mar 2018 04:14:31 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33978)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1f1pB5-0001jB-8n; Fri, 30 Mar 2018 04:14:27 -0400
Received: from [176.228.60.248] (port=3874 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1f1pB4-0004Hn-38; Fri, 30 Mar 2018 04:14:26 -0400
Date: Fri, 30 Mar 2018 11:14:13 +0300
Message-Id: <83h8oyc756.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
In-reply-to: <imzi2qb0e4.fsf@HIDDEN> (message from Glenn Morris on
 Fri, 30 Mar 2018 01:25:23 -0400)
Subject: Re: bug#30943: save-hist creates massive cache file
References: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
 <83o9jag9wg.fsf@HIDDEN>
 <CAJqN1i--ps--LUuS=ajwPSEoxSYGjC6U49cewmqSJD9R7SdJ6A@HIDDEN>
 <xn4ll1mhh0.fsf@HIDDEN>
 <CAJqN1i_W_VJsN+JgLBvYPWu31gzDbwGs_P+P=fwZ_T-NHN5XxQ@HIDDEN>
 <1rwoxusqjl.fsf@HIDDEN> <83po3md8hw.fsf@HIDDEN>
 <imzi2qb0e4.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 30943
Cc: 30943 <at> debbugs.gnu.org, cfindeisen@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Glenn Morris <rgm@HIDDEN>
> Cc: cfindeisen@HIDDEN,  30943 <at> debbugs.gnu.org
> Date: Fri, 30 Mar 2018 01:25:23 -0400
> 
> Eli Zaretskii wrote:
> 
> > I actually find that to be a nuisance even for visiting files.  With
> > 64-bit builds, this warning makes very little sense.
> 
> 32-bit builds are almost dead, so you may want to revisit the default.
> (See trend at https://debbugs.gnu.org/stats/emacs.html )

Yes, I think we should significantly increase the default value of
large-file-warning-threshold.  I always enlarge it in my .emacs,
because the default is even small enough to allow me reading my email
without annoying questions.

> But isn't it about how much physical memory the system has?

That's one factor to consider, yes.  But even that is normally what?
8GB nowadays?  And VM is then 2 or 4 times that?

> The largest el(c) file in the Emacs sources is ja-dic at 2.2MB,
> well below the current default for large-file-warning-threshold.
> So not warning about loading a 1/2GB file like in the initial report
> seems like a disservice.

I wouldn't worry before it got 10 times that, but that's me.

Don't forget that before that file was about to be read, it was
written by the previous Emacs session, which means that previous
session already had all that loaded, and took more memory than that
file's size.  If the user was not worried about their running Emacs's
footprint, why should we annoy them with questions at startup time?

IME, these measures are only useful when they prevent some very grave
problem, like Emacs crashing or becoming completely unresponsive.  (We
had such problems years ago, when the 64-bit build still had bugs with
using integer types that overflowed at INT_MAX, and we indeed had then
tests to prevent users from crossing that border.)  Otherwise, I
personally would prefer _not_ warning about large files and let each
user find the point where it becomes annoying to them.  This is
because IME that point is highly individual, and depends on both user
preferences and the resources on their machine.  We can never do as
well with a fixed threshold, even if its value is somehow calculated
from the available data: there are too many unknown factors here.

Again, just my $0.02.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30943; Package emacs. Full text available.

Message received at 30943 <at> debbugs.gnu.org:


Received: (at 30943) by debbugs.gnu.org; 30 Mar 2018 05:25:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 30 01:25:34 2018
Received: from localhost ([127.0.0.1]:59280 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f1mXe-0005DQ-Bc
	for submit <at> debbugs.gnu.org; Fri, 30 Mar 2018 01:25:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43190)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rgm@HIDDEN>) id 1f1mXc-0005DE-Mm
 for 30943 <at> debbugs.gnu.org; Fri, 30 Mar 2018 01:25:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rgm@HIDDEN>) id 1f1mXW-0008Qo-59
 for 30943 <at> debbugs.gnu.org; Fri, 30 Mar 2018 01:25:27 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60092)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rgm@HIDDEN>)
 id 1f1mXU-0008QE-1U; Fri, 30 Mar 2018 01:25:24 -0400
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1f1mXT-0007sf-7P; Fri, 30 Mar 2018 01:25:23 -0400
From: Glenn Morris <rgm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#30943: save-hist creates massive cache file
References: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
 <83o9jag9wg.fsf@HIDDEN>
 <CAJqN1i--ps--LUuS=ajwPSEoxSYGjC6U49cewmqSJD9R7SdJ6A@HIDDEN>
 <xn4ll1mhh0.fsf@HIDDEN>
 <CAJqN1i_W_VJsN+JgLBvYPWu31gzDbwGs_P+P=fwZ_T-NHN5XxQ@HIDDEN>
 <1rwoxusqjl.fsf@HIDDEN> <83po3md8hw.fsf@HIDDEN>
X-Spook: dedicated denial of service Federal Air Marshal Service
X-Ran: eE?^L*V"R}[F\G'kay~l7vj'#9[I$:90~<H92nvqj]lC~~/0jt9rv"=iYORJsUBI":^Z;F
X-Hue: brightblack
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Fri, 30 Mar 2018 01:25:23 -0400
In-Reply-To: <83po3md8hw.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 29 Mar
 2018 21:47:23 +0300")
Message-ID: <imzi2qb0e4.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 30943
Cc: 30943 <at> debbugs.gnu.org, cfindeisen@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Eli Zaretskii wrote:

> I actually find that to be a nuisance even for visiting files.  With
> 64-bit builds, this warning makes very little sense.

32-bit builds are almost dead, so you may want to revisit the default.
(See trend at https://debbugs.gnu.org/stats/emacs.html )

But isn't it about how much physical memory the system has?
Years ago people were saying 10MB was too small, eg
http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg02358.html

Anyway, getting OT...

The largest el(c) file in the Emacs sources is ja-dic at 2.2MB,
well below the current default for large-file-warning-threshold.
So not warning about loading a 1/2GB file like in the initial report
seems like a disservice.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30943; Package emacs. Full text available.

Message received at 30943 <at> debbugs.gnu.org:


Received: (at 30943) by debbugs.gnu.org; 29 Mar 2018 18:47:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 29 14:47:52 2018
Received: from localhost ([127.0.0.1]:59026 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f1caV-0003MX-PL
	for submit <at> debbugs.gnu.org; Thu, 29 Mar 2018 14:47:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47328)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1f1caR-0003MH-N2
 for 30943 <at> debbugs.gnu.org; Thu, 29 Mar 2018 14:47:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1f1caJ-0002Op-Dc
 for 30943 <at> debbugs.gnu.org; Thu, 29 Mar 2018 14:47:42 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49432)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1f1caJ-0002Od-9a; Thu, 29 Mar 2018 14:47:39 -0400
Received: from [176.228.60.248] (port=3153 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1f1caI-0005Z5-Fu; Thu, 29 Mar 2018 14:47:38 -0400
Date: Thu, 29 Mar 2018 21:47:23 +0300
Message-Id: <83po3md8hw.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
In-reply-to: <1rwoxusqjl.fsf@HIDDEN> (message from Glenn Morris on
 Thu, 29 Mar 2018 14:08:30 -0400)
Subject: Re: bug#30943: save-hist creates massive cache file
References: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
 <83o9jag9wg.fsf@HIDDEN>
 <CAJqN1i--ps--LUuS=ajwPSEoxSYGjC6U49cewmqSJD9R7SdJ6A@HIDDEN>
 <xn4ll1mhh0.fsf@HIDDEN>
 <CAJqN1i_W_VJsN+JgLBvYPWu31gzDbwGs_P+P=fwZ_T-NHN5XxQ@HIDDEN>
 <1rwoxusqjl.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 30943
Cc: 30943 <at> debbugs.gnu.org, cfindeisen@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Glenn Morris <rgm@HIDDEN>
> Cc: eliz@HIDDEN,  30943 <at> debbugs.gnu.org
> Date: Thu, 29 Mar 2018 14:08:30 -0400
> 
> 
> I think it's a reasonable feature request to ask that savehist be
> capable of dealing with additional variables that aren't automatically
> truncated (or if not it should be explicit about it).

That'd require people to register a function to do the truncation.  We
could, of course, provide a couple of default functions to do that
with "simple" variables.

> On the other hand, desktop is a superset of savehist and can can already
> do this (apparently, see desktop-globals-to-save).

Yep.

> I wonder if load should pay attention to large-file-warning-threshold
> somehow?

I actually find that to be a nuisance even for visiting files.  With
64-bit builds, this warning makes very little sense.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30943; Package emacs. Full text available.

Message received at 30943 <at> debbugs.gnu.org:


Received: (at 30943) by debbugs.gnu.org; 29 Mar 2018 18:08:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 29 14:08:40 2018
Received: from localhost ([127.0.0.1]:58973 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f1bya-0000S6-HT
	for submit <at> debbugs.gnu.org; Thu, 29 Mar 2018 14:08:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47436)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rgm@HIDDEN>) id 1f1byZ-0000Rt-3m
 for 30943 <at> debbugs.gnu.org; Thu, 29 Mar 2018 14:08:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rgm@HIDDEN>) id 1f1byT-0005En-3i
 for 30943 <at> debbugs.gnu.org; Thu, 29 Mar 2018 14:08:33 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48681)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rgm@HIDDEN>)
 id 1f1byR-0005Cq-L8; Thu, 29 Mar 2018 14:08:31 -0400
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1f1byR-0005Qz-4E; Thu, 29 Mar 2018 14:08:31 -0400
From: Glenn Morris <rgm@HIDDEN>
To: Chris Findeisen <cfindeisen@HIDDEN>
Subject: Re: bug#30943: save-hist creates massive cache file
References: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
 <83o9jag9wg.fsf@HIDDEN>
 <CAJqN1i--ps--LUuS=ajwPSEoxSYGjC6U49cewmqSJD9R7SdJ6A@HIDDEN>
 <xn4ll1mhh0.fsf@HIDDEN>
 <CAJqN1i_W_VJsN+JgLBvYPWu31gzDbwGs_P+P=fwZ_T-NHN5XxQ@HIDDEN>
X-Spook: military Spammer ASIO Reno csim Comirex NBIC Terror
X-Ran: z&|?ze(Q~hLLzgXRXTmO.O6"9jbLb-AvZ]p}F*t6lw&_WKbFROXVLxK8stVM]5/1X}c`~3
X-Hue: cyan
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Thu, 29 Mar 2018 14:08:30 -0400
In-Reply-To: <CAJqN1i_W_VJsN+JgLBvYPWu31gzDbwGs_P+P=fwZ_T-NHN5XxQ@HIDDEN>
 (Chris Findeisen's message of "Thu, 29 Mar 2018 16:27:12 +0000")
Message-ID: <1rwoxusqjl.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 30943
Cc: eliz@HIDDEN, 30943 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)


I think it's a reasonable feature request to ask that savehist be
capable of dealing with additional variables that aren't automatically
truncated (or if not it should be explicit about it).

On the other hand, desktop is a superset of savehist and can can already
do this (apparently, see desktop-globals-to-save).

I wonder if load should pay attention to large-file-warning-threshold
somehow?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30943; Package emacs. Full text available.

Message received at 30943 <at> debbugs.gnu.org:


Received: (at 30943) by debbugs.gnu.org; 29 Mar 2018 17:12:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 29 13:12:38 2018
Received: from localhost ([127.0.0.1]:58946 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f1b6M-0007au-7c
	for submit <at> debbugs.gnu.org; Thu, 29 Mar 2018 13:12:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35843)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rgm@HIDDEN>) id 1f1b6J-0007ah-P4
 for 30943 <at> debbugs.gnu.org; Thu, 29 Mar 2018 13:12:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rgm@HIDDEN>) id 1f1b6E-0005US-3E
 for 30943 <at> debbugs.gnu.org; Thu, 29 Mar 2018 13:12:30 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47515)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rgm@HIDDEN>)
 id 1f1b6C-0005SS-Dq; Thu, 29 Mar 2018 13:12:28 -0400
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1f1b6B-0006C9-QA; Thu, 29 Mar 2018 13:12:27 -0400
From: Glenn Morris <rgm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#30943: save-hist creates massive cache file
References: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
 <83o9jag9wg.fsf@HIDDEN> <qglgedbado.fsf@HIDDEN>
 <83bmf7dum9.fsf@HIDDEN>
X-Spook: Shelter-in-place MIT-LL afsatcom Tony Blair CIDA Body
X-Ran: )<Q[SU'xn7=GP\zLu<]5tFm)*0~!V{-bDJuj{xos8\ahKRzrVBE&4D3'%+?hmV_9e8gT,G
X-Hue: white
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Thu, 29 Mar 2018 13:12:27 -0400
In-Reply-To: <83bmf7dum9.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 29 Mar
 2018 13:49:34 +0300")
Message-ID: <5l605est50.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 30943
Cc: 30943 <at> debbugs.gnu.org, cfindeisen@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Eli Zaretskii wrote:

>> savehist doesn't truncate anything AFAICS.
>
> I meant savehist-trim-history.

savehist-trim-history is a no-op on Emacs. savehist relies on the trimming
of history variables that Emacs does in the course of normal operation.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30943; Package emacs. Full text available.

Message received at 30943 <at> debbugs.gnu.org:


Received: (at 30943) by debbugs.gnu.org; 29 Mar 2018 17:10:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 29 13:10:24 2018
Received: from localhost ([127.0.0.1]:58938 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f1b4C-0007XQ-HE
	for submit <at> debbugs.gnu.org; Thu, 29 Mar 2018 13:10:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33681)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1f1b4A-0007XB-Ku
 for 30943 <at> debbugs.gnu.org; Thu, 29 Mar 2018 13:10:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1f1b42-00031X-Bh
 for 30943 <at> debbugs.gnu.org; Thu, 29 Mar 2018 13:10:17 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47435)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1f1b42-00031T-8Q; Thu, 29 Mar 2018 13:10:14 -0400
Received: from [176.228.60.248] (port=3068 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1f1b41-0005wU-Gi; Thu, 29 Mar 2018 13:10:13 -0400
Date: Thu, 29 Mar 2018 20:09:59 +0300
Message-Id: <83r2o2dd08.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Chris Findeisen <cfindeisen@HIDDEN>
In-reply-to: <CAJqN1i_W_VJsN+JgLBvYPWu31gzDbwGs_P+P=fwZ_T-NHN5XxQ@HIDDEN>
 (message from Chris Findeisen on Thu, 29 Mar 2018 16:27:12 +0000)
Subject: Re: bug#30943: save-hist creates massive cache file
References: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
 <83o9jag9wg.fsf@HIDDEN>
 <CAJqN1i--ps--LUuS=ajwPSEoxSYGjC6U49cewmqSJD9R7SdJ6A@HIDDEN>
 <xn4ll1mhh0.fsf@HIDDEN>
 <CAJqN1i_W_VJsN+JgLBvYPWu31gzDbwGs_P+P=fwZ_T-NHN5XxQ@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 30943
Cc: rgm@HIDDEN, 30943 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Chris Findeisen <cfindeisen@HIDDEN>
> Date: Thu, 29 Mar 2018 16:27:12 +0000
> Cc: eliz@HIDDEN, 30943 <at> debbugs.gnu.org
> 
> Eli, apparently the savehist-trim-history function is only used on
> XEmacs--it's a noop on Emacs.

Granted, I know that, but you mentioned it, so I played along.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30943; Package emacs. Full text available.

Message received at 30943 <at> debbugs.gnu.org:


Received: (at 30943) by debbugs.gnu.org; 29 Mar 2018 16:27:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 29 12:27:55 2018
Received: from localhost ([127.0.0.1]:58867 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f1aP4-0006RZ-U3
	for submit <at> debbugs.gnu.org; Thu, 29 Mar 2018 12:27:55 -0400
Received: from mail-io0-f174.google.com ([209.85.223.174]:37014)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cfindeisen@HIDDEN>) id 1f1aP3-0006RN-Fg
 for 30943 <at> debbugs.gnu.org; Thu, 29 Mar 2018 12:27:53 -0400
Received: by mail-io0-f174.google.com with SMTP id y128so8330427iod.4
 for <30943 <at> debbugs.gnu.org>; Thu, 29 Mar 2018 09:27:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=qziNw+Pl1xahb2iHHpKibRncZzr7UiBunGWvQka9Fto=;
 b=RmsPzm/sZOgfQWeh/Y5+r90Q0adpO2RhSeX+d6DJUoUfkzgxl7RZHG1xtiMp39ymaN
 E6S7TEhUJvYcNUv5eHNN2IT/c1sn/O4A3gxqK43vfM1oOKIqSyffFi+SkoKNWjzr2IDI
 HK3Mkaoq7AmAz2iqH/YJaW+1c0KVvkTL/Rf/xep/fE+l6hSTr8juzCC69dZUGzA8fGUu
 og1vu+5YPYmYVASZt1nBp/MKebuUTGYv6qdRr49/dF97O4fJEZuG9OhaXszDW8GHu2br
 0A/o4piYtca7Qtj49r5D8YU/PIwNNHbQRE5aBfCSFEc9QOKChAyi3ZmrfeMEPWURkwDB
 DncA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=qziNw+Pl1xahb2iHHpKibRncZzr7UiBunGWvQka9Fto=;
 b=ZorTe9TXX7lXU4wqg86umSPMPb0wRYmJa/o388HKwerWsKwkaNGEppg+0bJ1qCZVQf
 6Ojl3YGOQvV2nWwzqqp9diANAXbnrWK0DBYnbkApBx0tA4jgaYxPPnA4/Mp5gS1DbsVS
 KOxTb42uvMr3zMzt7+9ms/bjVSX8+qhHMo/uDAizTlvx+dAqjUrSuJFaa+thA1boyxCv
 RcYvoadCUYP8wGQm6JRK+hhl5oksOvfd//tUYWoPESTGM4PolK1eDE9+ir7zFJlwudiz
 gtsvAzY+iq7XJF6nn6H+h20zORNH6bHZ9KPhEixVubMpU9fxxP+MunFn6RzGz48oJRNt
 EzIw==
X-Gm-Message-State: AElRT7FpD7eeLw6+114aKou8zHd2Gt5vGdiLWL1r/1MhJw+pcmW7zxCc
 n1k4nj+lske/syFYYSJnwxM/XaQChtCfV5xCUFVKag==
X-Google-Smtp-Source: AG47ELtU5AZFVYU3jshCbPSPO7x0KXnCbWiSa3aB41Sm+gafZI7RT7q+HkHOHZzpt/CKFJW7u6/DU0SNxmdrIeVehSg=
X-Received: by 10.107.18.129 with SMTP id 1mr56027260ios.164.1522340867561;
 Thu, 29 Mar 2018 09:27:47 -0700 (PDT)
MIME-Version: 1.0
References: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
 <83o9jag9wg.fsf@HIDDEN>
 <CAJqN1i--ps--LUuS=ajwPSEoxSYGjC6U49cewmqSJD9R7SdJ6A@HIDDEN>
 <xn4ll1mhh0.fsf@HIDDEN>
In-Reply-To: <xn4ll1mhh0.fsf@HIDDEN>
From: Chris Findeisen <cfindeisen@HIDDEN>
Date: Thu, 29 Mar 2018 16:27:12 +0000
Message-ID: <CAJqN1i_W_VJsN+JgLBvYPWu31gzDbwGs_P+P=fwZ_T-NHN5XxQ@HIDDEN>
Subject: Re: bug#30943: save-hist creates massive cache file
To: rgm@HIDDEN
Content-Type: multipart/alternative; boundary="001a113f354ca3c59605688f9ab8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 30943
Cc: eliz@HIDDEN, 30943 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--001a113f354ca3c59605688f9ab8
Content-Type: text/plain; charset="UTF-8"

>
> None of those look large.


yeah, I had rm'd my cache file when it was really huge (~1GB), now it's
regrowing. To get a sense of what I was looking at previously, I had a
similar output to this person's
https://emacs.stackexchange.com/questions/12086/abnormally-large-savehist-file.
The point is that over time these variables grow and grow and slow.

savehist doesn't truncate anything AFAICS.
> It just assumes variables are trimmed by add-to-history etc in the
> course of normal operation. So if you add a non-history variable to
> savehist (or set history-length to t), it will eventually blow up.
>

Hmm, ok. I may have misunderstood savehist's role then, I thought that
savehist managed history size. Eli, apparently the savehist-trim-history
function is only used on XEmacs--it's a noop on Emacs.

Sorry for the confusion then. First bug report :D ... failed bug report :(
. I'll talk to Spacemacs folks about fixing their configuration to guard
these variables accordingly. Thanks for your time!

Regards,
Chris Findeisen


On Tue, Mar 27, 2018 at 12:44 PM Glenn Morris <rgm@HIDDEN> wrote:

> Chris Findeisen wrote:
>
> > grep -E -b -o '^\(setq [^ ]+' ~/.emacs.d/.cache/savehist
> > ....
> > 51869:(setq evil-jumps-history
> > 53265:(setq mark-ring
> > 53287:(setq search-ring
> > 53311:(setq regexp-search-ring
> > 53579:(setq extended-command-history
>
> None of those look large.
> You either want to post the whole output, or find the one where the
> offset jumps significantly from the previous match.
>

--001a113f354ca3c59605688f9ab8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span st=
yle=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style=
:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:=
400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:n=
one;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);t=
ext-decoration-style:initial;text-decoration-color:initial;float:none;displ=
ay:inline">None of those look large.</span></blockquote><div><span style=3D=
"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:norma=
l;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;le=
tter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;wh=
ite-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-de=
coration-style:initial;text-decoration-color:initial;float:none;display:inl=
ine"><br></span></div><div>yeah, I had rm&#39;d my cache file when it was r=
eally huge (~1GB), now it&#39;s regrowing. To get a sense of what I was loo=
king at previously, I had a similar output to this person&#39;s<span style=
=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:no=
rmal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400=
;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none=
;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text=
-decoration-style:initial;text-decoration-color:initial;float:none;display:=
inline"><span>=C2=A0</span></span><a href=3D"https://emacs.stackexchange.co=
m/questions/12086/abnormally-large-savehist-file" style=3D"color:rgb(17,85,=
204);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-l=
igatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:nor=
mal;text-align:start;text-indent:0px;text-transform:none;white-space:normal=
;word-spacing:0px;background-color:rgb(255,255,255)" target=3D"_blank">http=
s://emacs.stackexchange.com/questions/12086/abnormally-large-savehist-file<=
/a>. The point is that over time these variables grow and grow and slow.<br=
 style=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-st=
yle:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weig=
ht:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transfor=
m:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255=
);text-decoration-style:initial;text-decoration-color:initial"></div><div><=
br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8e=
x;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=3D"m_=
-7842720804073937353gmail-gs" style=3D"margin:0px;padding:0px 0px 20px;colo=
r:rgb(34,34,34);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;f=
ont-size:medium;font-style:normal;font-variant-ligatures:normal;font-varian=
t-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-i=
ndent:0px;text-transform:none;white-space:normal;word-spacing:0px;backgroun=
d-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-colo=
r:initial"><div id=3D"m_-7842720804073937353gmail-:5o" class=3D"m_-78427208=
04073937353gmail-ii m_-7842720804073937353gmail-gt" style=3D"font-size:9.6p=
x;direction:ltr;margin:8px 0px 0px;padding:0px"><div id=3D"m_-7842720804073=
937353gmail-:19w" class=3D"m_-7842720804073937353gmail-a3s m_-7842720804073=
937353gmail-aXjCH" style=3D"overflow:hidden;font-style:normal;font-variant:=
normal;font-weight:normal;font-stretch:normal;font-size:13px;line-height:1.=
5;font-family:sans-serif">savehist doesn&#39;t truncate anything AFAICS.<br=
>It just assumes variables are trimmed by add-to-history etc in the<br>cour=
se of normal operation. So if you add a non-history variable to<br>savehist=
 (or set history-length to t), it will eventually blow up.</div></div></div=
></blockquote><div><br></div>Hmm, ok. I may have misunderstood savehist&#39=
;s role then, I thought that savehist managed history size. Eli, apparently=
 the savehist-trim-history function is only used on XEmacs--it&#39;s a noop=
 on Emacs.=C2=A0<div><br></div><div>Sorry for the confusion then. First bug=
 report :D ... failed bug report :( . I&#39;ll talk to Spacemacs folks abou=
t fixing their configuration to guard these variables accordingly. Thanks f=
or your time!</div><div><div><div><br clear=3D"all"><div><div dir=3D"ltr" c=
lass=3D"m_-7842720804073937353gmail_signature"><div dir=3D"ltr"><div><div d=
ir=3D"ltr"><div><div><font color=3D"#000000" face=3D"arial, helvetica, sans=
-serif" size=3D"2">Regards,</font></div><div><font color=3D"#000000" face=
=3D"arial, helvetica, sans-serif" size=3D"2">Chris Findeisen</font></div></=
div></div></div></div></div></div><br></div></div></div></div><br><div clas=
s=3D"gmail_quote"><div dir=3D"ltr">On Tue, Mar 27, 2018 at 12:44 PM Glenn M=
orris &lt;<a href=3D"mailto:rgm@HIDDEN" target=3D"_blank">rgm@HIDDEN</a>&=
gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex">Chris Findeisen wrote:<b=
r>
<br>
&gt; grep -E -b -o &#39;^\(setq [^ ]+&#39; ~/.emacs.d/.cache/savehist<br>
&gt; ....<br>
&gt; 51869:(setq evil-jumps-history<br>
&gt; 53265:(setq mark-ring<br>
&gt; 53287:(setq search-ring<br>
&gt; 53311:(setq regexp-search-ring<br>
&gt; 53579:(setq extended-command-history<br>
<br>
None of those look large.<br>
You either want to post the whole output, or find the one where the<br>
offset jumps significantly from the previous match.<br>
</blockquote></div>

--001a113f354ca3c59605688f9ab8--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30943; Package emacs. Full text available.

Message received at 30943 <at> debbugs.gnu.org:


Received: (at 30943) by debbugs.gnu.org; 29 Mar 2018 10:50:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 29 06:50:03 2018
Received: from localhost ([127.0.0.1]:57996 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f1V86-0004R1-QE
	for submit <at> debbugs.gnu.org; Thu, 29 Mar 2018 06:50:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37302)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1f1V84-0004QU-RU
 for 30943 <at> debbugs.gnu.org; Thu, 29 Mar 2018 06:50:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1f1V7w-0003hs-Fx
 for 30943 <at> debbugs.gnu.org; Thu, 29 Mar 2018 06:49:55 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39410)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1f1V7w-0003hk-CG; Thu, 29 Mar 2018 06:49:52 -0400
Received: from [176.228.60.248] (port=2083 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1f1V7u-0001pV-Gk; Thu, 29 Mar 2018 06:49:50 -0400
Date: Thu, 29 Mar 2018 13:49:34 +0300
Message-Id: <83bmf7dum9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
In-reply-to: <qglgedbado.fsf@HIDDEN> (message from Glenn Morris on
 Tue, 27 Mar 2018 15:12:51 -0400)
Subject: Re: bug#30943: save-hist creates massive cache file
References: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
 <83o9jag9wg.fsf@HIDDEN> <qglgedbado.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 30943
Cc: 30943 <at> debbugs.gnu.org, cfindeisen@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Glenn Morris <rgm@HIDDEN>
> Cc: Chris Findeisen <cfindeisen@HIDDEN>,  30943 <at> debbugs.gnu.org
> Date: Tue, 27 Mar 2018 15:12:51 -0400
> 
> Eli Zaretskii wrote:
> 
> > Save-hist doesn't truncate any variables except the ones it knows
> > about, because it cannot be sure that truncating some list might leave
> > the variable with an invalid value.
> 
> savehist doesn't truncate anything AFAICS.

I meant savehist-trim-history.  Or maybe I misunderstand what you are
alluding to.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30943; Package emacs. Full text available.

Message received at 30943 <at> debbugs.gnu.org:


Received: (at 30943) by debbugs.gnu.org; 27 Mar 2018 19:44:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 27 15:44:21 2018
Received: from localhost ([127.0.0.1]:56267 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f0uW5-0000Rs-6r
	for submit <at> debbugs.gnu.org; Tue, 27 Mar 2018 15:44:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51593)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rgm@HIDDEN>) id 1f0uW3-0000Rh-M5
 for 30943 <at> debbugs.gnu.org; Tue, 27 Mar 2018 15:44:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rgm@HIDDEN>) id 1f0uVx-0007Fq-Rj
 for 30943 <at> debbugs.gnu.org; Tue, 27 Mar 2018 15:44:14 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54849)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rgm@HIDDEN>)
 id 1f0uVw-0007Ec-98; Tue, 27 Mar 2018 15:44:12 -0400
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1f0uVv-0002TO-P1; Tue, 27 Mar 2018 15:44:11 -0400
From: Glenn Morris <rgm@HIDDEN>
To: Chris Findeisen <cfindeisen@HIDDEN>
Subject: Re: bug#30943: save-hist creates massive cache file
References: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
 <83o9jag9wg.fsf@HIDDEN>
 <CAJqN1i--ps--LUuS=ajwPSEoxSYGjC6U49cewmqSJD9R7SdJ6A@HIDDEN>
X-Spook: Euskadi ta Askatasuna CBP MILSATCOM Federal Air Marshal
X-Ran: b0""6X[[YX}lX2r}k88SUIm6w:N|$g'30!jw"b'~_:`oS,C(U&2_pTV33a;K.c'5nEx],|
X-Hue: blue
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Tue, 27 Mar 2018 15:44:11 -0400
In-Reply-To: <CAJqN1i--ps--LUuS=ajwPSEoxSYGjC6U49cewmqSJD9R7SdJ6A@HIDDEN>
 (Chris Findeisen's message of "Tue, 27 Mar 2018 02:50:57 +0000")
Message-ID: <xn4ll1mhh0.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 30943
Cc: eliz@HIDDEN, 30943 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Chris Findeisen wrote:

> grep -E -b -o '^\(setq [^ ]+' ~/.emacs.d/.cache/savehist
> ....
> 51869:(setq evil-jumps-history
> 53265:(setq mark-ring
> 53287:(setq search-ring
> 53311:(setq regexp-search-ring
> 53579:(setq extended-command-history

None of those look large.
You either want to post the whole output, or find the one where the
offset jumps significantly from the previous match.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30943; Package emacs. Full text available.

Message received at 30943 <at> debbugs.gnu.org:


Received: (at 30943) by debbugs.gnu.org; 27 Mar 2018 19:13:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 27 15:13:04 2018
Received: from localhost ([127.0.0.1]:56250 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f0u1n-00087Z-Va
	for submit <at> debbugs.gnu.org; Tue, 27 Mar 2018 15:13:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42979)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rgm@HIDDEN>) id 1f0u1l-000873-Sh
 for 30943 <at> debbugs.gnu.org; Tue, 27 Mar 2018 15:13:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rgm@HIDDEN>) id 1f0u1f-0000VY-Ue
 for 30943 <at> debbugs.gnu.org; Tue, 27 Mar 2018 15:12:56 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54213)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rgm@HIDDEN>)
 id 1f0u1e-0000UV-Bs; Tue, 27 Mar 2018 15:12:54 -0400
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1f0u1b-0003q1-J4; Tue, 27 Mar 2018 15:12:51 -0400
From: Glenn Morris <rgm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#30943: save-hist creates massive cache file
References: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
 <83o9jag9wg.fsf@HIDDEN>
X-Spook: class struggle offensive information warfare outage
X-Ran: FOjK}*0chD:uK1Rma_?D.}GdEVdKx6QfI{oK`<k@n\*o^!1H>j_s0m?'x-pR679:0&J1cR
X-Hue: white
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Tue, 27 Mar 2018 15:12:51 -0400
In-Reply-To: <83o9jag9wg.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 26 Mar
 2018 17:59:43 +0300")
Message-ID: <qglgedbado.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 30943
Cc: 30943 <at> debbugs.gnu.org, Chris Findeisen <cfindeisen@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Eli Zaretskii wrote:

> Save-hist doesn't truncate any variables except the ones it knows
> about, because it cannot be sure that truncating some list might leave
> the variable with an invalid value.

savehist doesn't truncate anything AFAICS.
It just assumes variables are trimmed by add-to-history etc in the
course of normal operation. So if you add a non-history variable to
savehist (or set history-length to t), it will eventually blow up.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30943; Package emacs. Full text available.

Message received at 30943 <at> debbugs.gnu.org:


Received: (at 30943) by debbugs.gnu.org; 27 Mar 2018 02:51:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 26 22:51:42 2018
Received: from localhost ([127.0.0.1]:54994 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f0ei5-0002Py-Tw
	for submit <at> debbugs.gnu.org; Mon, 26 Mar 2018 22:51:42 -0400
Received: from mail-it0-f41.google.com ([209.85.214.41]:38918)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cfindeisen@HIDDEN>) id 1f0ei3-0002Pl-MX
 for 30943 <at> debbugs.gnu.org; Mon, 26 Mar 2018 22:51:40 -0400
Received: by mail-it0-f41.google.com with SMTP id e98-v6so13333184itd.4
 for <30943 <at> debbugs.gnu.org>; Mon, 26 Mar 2018 19:51:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=Ix0ZeWZBjpMPXcrKbCJNMqvsqvQJSYPcxW+y0nixtPg=;
 b=qSIKGSjOT/gwyjI0J717Htm+4tUVXjGnGdQyhVv70rcuvY57suZol4/vZxCFYczyRW
 nzTnU5MNc+uRvG6LHQWYHwQIAAdAClcKSLidmvKfjoEKYJyanDHTqN3nhaPHPDlpONCc
 peIK7723X1EFFFh44UbHBI88EsqP4KqraufN48riTG/KadsSlFfyoJEGcZEGObOaUHcf
 u9tLaYcM7xf4WIpXa/xeM8ee/1ak3GjYCKZQA1YnJgrXP79gKhuQ2dESva9LXt+WQGvq
 nrjWgM0tk6vPP1oMnex622WRhVhwTGVtn6ZpKKyOZkKZgDKWB8u+bnpAH3qsAzUDvTjw
 H3Kg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=Ix0ZeWZBjpMPXcrKbCJNMqvsqvQJSYPcxW+y0nixtPg=;
 b=NSHw+77+q7wLEZtSA6QaKWBQ5eh3GpgTGoXK0irrKmxkvgXZuoLXxcS9frNnH/Rxay
 YvbP6DsllAe1m3/Bzv33TawIMweGmKpNQP458Qi/Ak8vaEJRpAjq4SfCY7uwfCGP0tAX
 OHHXhf+DCj4HVb0P8nuXk7/XLdbXwmqDoUezmmYehKgRjNFgpfn8HKcmGXObvPOhsMBl
 ANBE3xAa7krut+npGirDvR1YgJtCdCRH+uRWDJ5Ody1raWiCdK/5ril3FGPq3Vkf3NO7
 N7yzZstEOb2YOS6m8hVLxLkAjMZxDBHBcFnbzYHRCZuZofYRR2QdxZ0z8taxJbh2Gjkd
 g+EA==
X-Gm-Message-State: AElRT7GmpPOWvMT5nQkhE1xJ0mpc0GEy8Q2c8YrPHsOGgJN3UU9vTceb
 mIrQtyUsIKN+vHRlqZbWSUowme//DJ6zVdWSLqUeBQ==
X-Google-Smtp-Source: AIpwx49cdGLWM21m44kcTHOzSLIzm5zzThec1lzERc8GhOYZalJkcQSwd672YNzZiVnfCdTAAn7iyWMeGe2pzaVaRAA=
X-Received: by 2002:a24:1f15:: with SMTP id
 d21-v6mr24949574itd.71.1522119093305; 
 Mon, 26 Mar 2018 19:51:33 -0700 (PDT)
MIME-Version: 1.0
References: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
 <83o9jag9wg.fsf@HIDDEN>
In-Reply-To: <83o9jag9wg.fsf@HIDDEN>
From: Chris Findeisen <cfindeisen@HIDDEN>
Date: Tue, 27 Mar 2018 02:50:57 +0000
Message-ID: <CAJqN1i--ps--LUuS=ajwPSEoxSYGjC6U49cewmqSJD9R7SdJ6A@HIDDEN>
Subject: Re: bug#30943: save-hist creates massive cache file
To: eliz@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000dd35c605685bf7a8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 30943
Cc: 30943 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--000000000000dd35c605685bf7a8
Content-Type: text/plain; charset="UTF-8"

Hey Eli,

Correct, the issue is that the variable is growing from session to session
without limitation.

For instance, some of the culprits from my particular configuration:
grep -E -b -o '^\(setq [^ ]+' ~/.emacs.d/.cache/savehist
....
51869:(setq evil-jumps-history
53265:(setq mark-ring
53287:(setq search-ring
53311:(setq regexp-search-ring
53579:(setq extended-command-history

I've also seen online this issue crop up for others:
https://emacs.stackexchange.com/questions/12086/abnormally-large-savehist-file

Save-hist doesn't truncate any variables except the ones it knows
> about, because it cannot be sure that truncating some list might leave
> the variable with an invalid value.  For variables like
> minibuffer-history, it knows that truncating the history will produce
> a history that is still valid, but how can it do the same with other

variables?

For example, it could be that some other variable needs to
> be truncated from the other end of the list, otherwise the value will
> be useless.


Hmm, I understand the dilemma about not knowing the format, however there
ought to be an alternative way of adding variables that we can "inform"
save-hist about. Whether that's demanding/documenting a valid format, "Hey
if you add this variable to be tracked by save-hist, it must be formatted
like so" or providing a secondary argument that takes a function specifying
custom handling, I'm not sure.

I think it makes sense to provide some method of honoring the
history-length variable. If the list is never culled, any emacs session
will just grow over time. That is almost never desired(at least for me),
and I would see no point to have additional-variables to be track (I would
have to worry about my buffer silently slowing me down).

Let me know if I'm missing something, or if you have alternate ideas.
Thanks!

Regards,
Chris Findeisen

On Mon, Mar 26, 2018 at 7:59 AM Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: Chris Findeisen <cfindeisen@HIDDEN>
> > Date: Sun, 25 Mar 2018 19:11:21 +0000
> >
> > save-hist-additional-variables never get truncated by save-hist, leading
> > to a massive cache file and slowdown. Practically, this matters when the
> cache file silently grows to 1/2 a
> > GB, and emacs begins randomly freezing.
> >
> > history-length is supposed to keep a limit on the max history for
> save-hist-additional-variables, but it doesn't.
> >
> > In the savehist-save function:
> >
> > (dolist (symbol savehist-minibuffer-history-variables)
> >           (when (and (boundp symbol)
> >                      (not (memq symbol savehist-ignored-variables)))
> >             (let ((value (savehist-trim-history (symbol-value symbol)))
> >       ;;....
> >   ))))
> >
> > (dolist (symbol savehist-additional-variables)
> >   (when (boundp symbol)
> >     (let ((value (symbol-value symbol)))
> >     (when (savehist-printable value)
> >     ;; ...
> >     ))))
> >
> > As you can see, the save-hist-trim-history fn is not called in the
> > second code block.
>
> I'm not sure I understand the situation.  Is the variable you are
> trying to save using save-hist a long list or something, and it keeps
> growing from session to session without any limitation?
>
> Save-hist doesn't truncate any variables except the ones it knows
> about, because it cannot be sure that truncating some list might leave
> the variable with an invalid value.  For variables like
> minibuffer-history, it knows that truncating the history will produce
> a history that is still valid, but how can it do the same with other
> variables?  For example, it could be that some other variable needs to
> be truncated from the other end of the list, otherwise the value will
> be useless.
>
> If I'm missing something about your use case, please tell the details,
> and perhaps show an example of a variable with which this happens.
>
> Thanks.
>

--000000000000dd35c605685bf7a8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hey Eli,=C2=A0<div><br></div><div>Correct, the issue is th=
at the variable is growing from session to session without limitation.</div=
><div><br></div><div>For instance, some of the culprits from my particular =
configuration:</div><div><div>grep -E -b -o &#39;^\(setq [^ ]+&#39; ~/.emac=
s.d/.cache/savehist</div></div><div>....</div><div>51869:(setq evil-jumps-h=
istory</div><div>53265:(setq mark-ring</div><div>53287:(setq search-ring</d=
iv><div>53311:(setq regexp-search-ring</div><div><div>53579:(setq extended-=
command-history</div></div><div><br></div><div>I&#39;ve also seen online th=
is issue crop up for others: <a href=3D"https://emacs.stackexchange.com/que=
stions/12086/abnormally-large-savehist-file" target=3D"_blank">https://emac=
s.stackexchange.com/questions/12086/abnormally-large-savehist-file</a><br><=
br class=3D"m_2272368822607271724gmail-m_636073064985831169gmail-Apple-inte=
rchange-newline"></div><blockquote class=3D"gmail_quote" style=3D"margin:0p=
x 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><s=
pan style=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font=
-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-w=
eight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,=
255);text-decoration-style:initial;text-decoration-color:initial;float:none=
;display:inline">Save-hist doesn&#39;t truncate any variables except the on=
es it knows<br></span><span style=3D"color:rgb(34,34,34);font-family:sans-s=
erif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-va=
riant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;te=
xt-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;backg=
round-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-=
color:initial;float:none;display:inline">about, because it cannot be sure t=
hat truncating some list might leave<br></span><span style=3D"color:rgb(34,=
34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant=
-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:n=
ormal;text-align:start;text-indent:0px;text-transform:none;white-space:norm=
al;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style=
:initial;text-decoration-color:initial;float:none;display:inline">the varia=
ble with an invalid value.=C2=A0 For variables like<br></span><span style=
=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:no=
rmal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400=
;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none=
;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text=
-decoration-style:initial;text-decoration-color:initial;float:none;display:=
inline">minibuffer-history, it knows that truncating the history will produ=
ce<br></span><span style=3D"color:rgb(34,34,34);font-family:sans-serif;font=
-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-cap=
s:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent=
:0px;text-transform:none;white-space:normal;word-spacing:0px;background-col=
or:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:ini=
tial;float:none;display:inline">a history that is still valid, but how can =
it do the same with other</span></blockquote><div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,20=
4,204);padding-left:1ex"><span style=3D"color:rgb(34,34,34);font-family:san=
s-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font=
-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start=
;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;ba=
ckground-color:rgb(255,255,255);text-decoration-style:initial;text-decorati=
on-color:initial;float:none;display:inline">variables?=C2=A0</span></blockq=
uote></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style=3D=
"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:norma=
l;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;le=
tter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;wh=
ite-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-de=
coration-style:initial;text-decoration-color:initial;float:none;display:inl=
ine">For example, it could be that some other variable needs to<br></span><=
span style=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;fon=
t-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-=
weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255=
,255);text-decoration-style:initial;text-decoration-color:initial;float:non=
e;display:inline">be truncated from the other end of the list, otherwise th=
e value will<br></span><span style=3D"color:rgb(34,34,34);font-family:sans-=
serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-v=
ariant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;t=
ext-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;back=
ground-color:rgb(255,255,255);text-decoration-style:initial;text-decoration=
-color:initial;float:none;display:inline">be useless.</span></blockquote><d=
iv><br></div><div><span style=3D"color:rgb(34,34,34);font-family:sans-serif=
;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-varian=
t-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-i=
ndent:0px;text-transform:none;white-space:normal;word-spacing:0px;backgroun=
d-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-colo=
r:initial;float:none;display:inline">Hmm, I understand the dilemma about no=
t knowing the format</span>, however there ought to be an alternative way o=
f adding variables that we can &quot;inform&quot; save-hist about. Whether =
that&#39;s demanding/documenting a valid format, &quot;Hey if you add this =
variable to be tracked by save-hist, it must be formatted like so&quot; or =
providing a secondary argument that takes a function specifying custom hand=
ling, I&#39;m not sure.=C2=A0</div><div><br></div><div>I think it makes sen=
se to provide some method of honoring the history-length variable. If the l=
ist is never culled, any emacs session will just grow over time. That is al=
most never desired(at least for me), and I would see no point to have addit=
ional-variables to be track (I would have to worry about my buffer silently=
 slowing me down).=C2=A0</div><div><br></div><div>Let me know if I&#39;m mi=
ssing something, or if you have alternate ideas. Thanks!</div><div><br></di=
v><div><div dir=3D"ltr" class=3D"m_2272368822607271724gmail-m_6360730649858=
31169gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div><fon=
t color=3D"#000000" face=3D"arial, helvetica, sans-serif" size=3D"2">Regard=
s,</font></div><div><font color=3D"#000000" face=3D"arial, helvetica, sans-=
serif" size=3D"2">Chris Findeisen</font></div></div></div></div></div></div=
></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Mon, Mar 26, 2018=
 at 7:59 AM Eli Zaretskii &lt;<a href=3D"mailto:eliz@HIDDEN" target=3D"_bl=
ank">eliz@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote"=
 style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p=
adding-left:1ex">&gt; From: Chris Findeisen &lt;<a href=3D"mailto:cfindeise=
n@HIDDEN" target=3D"_blank">cfindeisen@HIDDEN</a>&gt;<br>
&gt; Date: Sun, 25 Mar 2018 19:11:21 +0000<br>
&gt;<br>
&gt; save-hist-additional-variables never get truncated by save-hist, leadi=
ng<br>
&gt; to a massive cache file and slowdown. Practically, this matters when t=
he cache file silently grows to 1/2 a<br>
&gt; GB, and emacs begins randomly freezing.<br>
&gt;<br>
&gt; history-length is supposed to keep a limit on the max history for save=
-hist-additional-variables, but it doesn&#39;t.<br>
&gt;<br>
&gt; In the savehist-save function:<br>
&gt;<br>
&gt; (dolist (symbol savehist-minibuffer-history-variables)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when (and (boundp symbol)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 (not (memq symbol savehist-ignored-variables)))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let ((value (savehist-=
trim-history (symbol-value symbol)))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0;;....<br>
&gt;=C2=A0 =C2=A0))))<br>
&gt;<br>
&gt; (dolist (symbol savehist-additional-variables)<br>
&gt;=C2=A0 =C2=A0(when (boundp symbol)<br>
&gt;=C2=A0 =C2=A0 =C2=A0(let ((value (symbol-value symbol)))<br>
&gt;=C2=A0 =C2=A0 =C2=A0(when (savehist-printable value)<br>
&gt;=C2=A0 =C2=A0 =C2=A0;; ...<br>
&gt;=C2=A0 =C2=A0 =C2=A0))))<br>
&gt;<br>
&gt; As you can see, the save-hist-trim-history fn is not called in the<br>
&gt; second code block.<br>
<br>
I&#39;m not sure I understand the situation.=C2=A0 Is the variable you are<=
br>
trying to save using save-hist a long list or something, and it keeps<br>
growing from session to session without any limitation?<br>
<br>
Save-hist doesn&#39;t truncate any variables except the ones it knows<br>
about, because it cannot be sure that truncating some list might leave<br>
the variable with an invalid value.=C2=A0 For variables like<br>
minibuffer-history, it knows that truncating the history will produce<br>
a history that is still valid, but how can it do the same with other<br>
variables?=C2=A0 For example, it could be that some other variable needs to=
<br>
be truncated from the other end of the list, otherwise the value will<br>
be useless.<br>
<br>
If I&#39;m missing something about your use case, please tell the details,<=
br>
and perhaps show an example of a variable with which this happens.<br>
<br>
Thanks.<br>
</blockquote></div></div>

--000000000000dd35c605685bf7a8--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30943; Package emacs. Full text available.

Message received at 30943 <at> debbugs.gnu.org:


Received: (at 30943) by debbugs.gnu.org; 26 Mar 2018 14:59:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 26 10:59:47 2018
Received: from localhost ([127.0.0.1]:54492 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f0Tb8-0000Y6-Vc
	for submit <at> debbugs.gnu.org; Mon, 26 Mar 2018 10:59:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60754)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1f0Tb7-0000Xs-9X
 for 30943 <at> debbugs.gnu.org; Mon, 26 Mar 2018 10:59:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1f0Taw-0004ZD-DX
 for 30943 <at> debbugs.gnu.org; Mon, 26 Mar 2018 10:59:40 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44965)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1f0Taw-0004Z1-Ah; Mon, 26 Mar 2018 10:59:34 -0400
Received: from [176.228.60.248] (port=2856 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1f0Tav-0005Us-Ma; Mon, 26 Mar 2018 10:59:34 -0400
Date: Mon, 26 Mar 2018 17:59:43 +0300
Message-Id: <83o9jag9wg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Chris Findeisen <cfindeisen@HIDDEN>
In-reply-to: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
 (message from Chris Findeisen on Sun, 25 Mar 2018 19:11:21 +0000)
Subject: Re: bug#30943: save-hist creates massive cache file
References: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 30943
Cc: 30943 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Chris Findeisen <cfindeisen@HIDDEN>
> Date: Sun, 25 Mar 2018 19:11:21 +0000
> 
> save-hist-additional-variables never get truncated by save-hist, leading
> to a massive cache file and slowdown. Practically, this matters when the cache file silently grows to 1/2 a
> GB, and emacs begins randomly freezing.
> 
> history-length is supposed to keep a limit on the max history for save-hist-additional-variables, but it doesn't.
> 
> In the savehist-save function:
> 
> (dolist (symbol savehist-minibuffer-history-variables)
>           (when (and (boundp symbol)
>                      (not (memq symbol savehist-ignored-variables)))
>             (let ((value (savehist-trim-history (symbol-value symbol)))
>       ;;....
>   ))))
> 
> (dolist (symbol savehist-additional-variables)
>   (when (boundp symbol)
>     (let ((value (symbol-value symbol)))
>     (when (savehist-printable value)
>     ;; ...
>     ))))
> 
> As you can see, the save-hist-trim-history fn is not called in the
> second code block.

I'm not sure I understand the situation.  Is the variable you are
trying to save using save-hist a long list or something, and it keeps
growing from session to session without any limitation?

Save-hist doesn't truncate any variables except the ones it knows
about, because it cannot be sure that truncating some list might leave
the variable with an invalid value.  For variables like
minibuffer-history, it knows that truncating the history will produce
a history that is still valid, but how can it do the same with other
variables?  For example, it could be that some other variable needs to
be truncated from the other end of the list, otherwise the value will
be useless.

If I'm missing something about your use case, please tell the details,
and perhaps show an example of a variable with which this happens.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30943; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Mar 2018 22:58:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 25 18:58:17 2018
Received: from localhost ([127.0.0.1]:53268 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f0Eae-0004TF-Qy
	for submit <at> debbugs.gnu.org; Sun, 25 Mar 2018 18:58:17 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46933)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cfindeisen@HIDDEN>) id 1f0B3n-0007eb-8y
 for submit <at> debbugs.gnu.org; Sun, 25 Mar 2018 15:12:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <cfindeisen@HIDDEN>) id 1f0B3h-0007LY-4J
 for submit <at> debbugs.gnu.org; Sun, 25 Mar 2018 15:12:01 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:32864)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <cfindeisen@HIDDEN>)
 id 1f0B3h-0007LS-0S
 for submit <at> debbugs.gnu.org; Sun, 25 Mar 2018 15:12:01 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37898)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <cfindeisen@HIDDEN>) id 1f0B3f-0004QC-VD
 for bug-gnu-emacs@HIDDEN; Sun, 25 Mar 2018 15:12:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <cfindeisen@HIDDEN>) id 1f0B3f-0007JE-3o
 for bug-gnu-emacs@HIDDEN; Sun, 25 Mar 2018 15:11:59 -0400
Received: from mail-it0-x229.google.com ([2607:f8b0:4001:c0b::229]:50413)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <cfindeisen@HIDDEN>)
 id 1f0B3e-0007II-Sk
 for bug-gnu-emacs@HIDDEN; Sun, 25 Mar 2018 15:11:59 -0400
Received: by mail-it0-x229.google.com with SMTP id d13-v6so8119145itf.0
 for <bug-gnu-emacs@HIDDEN>; Sun, 25 Mar 2018 12:11:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=xTp3xEK4yH6K/xnV2ZSh2VHm1TICfQ+SbAHkM17SjW4=;
 b=DvlCmZ5I4J7fF3VLoU1ZFTV1CNJeDiUiwdAJ978d0w+JSR51jObVkXXG0tQiFgbI9a
 hCoQyY3WWfaftF+wyUBEcj/cYJ8fprWM1tJCFvOgIm2LVEbvcrGq+7Qby+XzYhTeIPGC
 SCm15ZktSna1YgnZNQEKPZ+Watj+4RnN2/uzdHakRHWTLoZBvle0wtPFoUh9zq+ZITV+
 CRscdksdZgJF5okouToIdhXt6Msh84rmLQk3E11rNrSDYtCwcKgNyoZEAogH2yJHKHdU
 9Yg//FNvPE8KZDLWmGo2f0LkEZcenK8GPu8WprfAyBDNzKFWPRRYArGngcylp1uw0Zd6
 CPEQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=xTp3xEK4yH6K/xnV2ZSh2VHm1TICfQ+SbAHkM17SjW4=;
 b=Uu/T7jRFUPNQRNyMHbR7A+tWKpVHalNjm/zfuBc0Ka8dMyo/a5Pd3NEjh0uG4hDBfX
 eHtT0Y7+2TiE42Yp828pGMfuq++3NRPpj++chXCY4B5VdkfT/LZxsVZbLgBkn5xZkA0C
 xKp29CCtcJyltCClMfTlbmasriEYJH3GngTqXdfZ+iaefZ370diqjDSSwGInfYsQsprl
 KVzgl1hg+ZJFwN9a3/FN6G4TznqaAndGq3OXLdVUJ7SK7yfll7YRx+39uWMlp+FqVphl
 a7YjjuXJA9qDnDwEyHZzpO4VOYBEPsP0qpNYcZ006oegIG4q2pjtzB0lrE+j9Y74l0DN
 U3Yg==
X-Gm-Message-State: AElRT7EByd86U95nk6IxPIW3Umn72uucrRnNj0q1PEVgKUMlEhci4nnb
 4HV1WGTQ6LcKVeCbKkjTKmXqIHb0WiPW+fSx8ftYAh7Szls=
X-Google-Smtp-Source: AG47ELttapGmwoTb4kkrlZeqazOjNqw1n5wHzaX60GxjSaHm1DsCBIpP1EFd0J7MsL6gbZ/ZYwCEK35fUASRL7no5t0=
X-Received: by 2002:a24:7813:: with SMTP id
 p19-v6mr19540499itc.93.1522005117127; 
 Sun, 25 Mar 2018 12:11:57 -0700 (PDT)
MIME-Version: 1.0
From: Chris Findeisen <cfindeisen@HIDDEN>
Date: Sun, 25 Mar 2018 19:11:21 +0000
Message-ID: <CAJqN1i_KwD1MWaAH+Pufq+2+U7QW5k7GBh8YVv0GExjx=SHrJQ@HIDDEN>
Subject: save-hist creates massive cache file
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="0000000000005aedda0568416e4a"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 25 Mar 2018 18:58:15 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--0000000000005aedda0568416e4a
Content-Type: text/plain; charset="UTF-8"

save-hist-additional-variables never get truncated by save-hist, leading
to a massive cache file and slowdown. Practically, this matters when the
cache file silently grows to 1/2 a GB, and emacs begins randomly freezing.

history-length is supposed to keep a limit on the max history for
save-hist-additional-variables, but it doesn't.

In the savehist-save function:

(dolist (symbol savehist-minibuffer-history-variables)
          (when (and (boundp symbol)
                     (not (memq symbol savehist-ignored-variables)))
            (let ((value (savehist-trim-history (symbol-value symbol)))
      ;;....
  ))))

(dolist (symbol savehist-additional-variables)
  (when (boundp symbol)
    (let ((value (symbol-value symbol)))
    (when (savehist-printable value)
    ;; ...
    ))))

As you can see, the save-hist-trim-history fn is not called in the
second code block.

--0000000000005aedda0568416e4a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><span style=3D"color:rgb(34,34,34);font-family:sans-serif;=
font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant=
-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-in=
dent:0px;text-transform:none;white-space:normal;word-spacing:0px;background=
-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color=
:initial;float:none;display:inline">save-hist-additional-variables never ge=
t truncated by save-hist, leading</span><br style=3D"color:rgb(34,34,34);fo=
nt-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligature=
s:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;tex=
t-align:start;text-indent:0px;text-transform:none;white-space:normal;word-s=
pacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;=
text-decoration-color:initial"><span style=3D"color:rgb(34,34,34);font-fami=
ly:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:norma=
l;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align=
:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:=
0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-de=
coration-color:initial;float:none;display:inline">to a massive cache file a=
nd slowdown. Practically, this matters when the cache file silently grows t=
o 1/2 a GB, and emacs begins randomly freezing.</span><br style=3D"color:rg=
b(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-va=
riant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spac=
ing:normal;text-align:start;text-indent:0px;text-transform:none;white-space=
:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-=
style:initial;text-decoration-color:initial"><br style=3D"color:rgb(34,34,3=
4);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-lig=
atures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:norma=
l;text-align:start;text-indent:0px;text-transform:none;white-space:normal;w=
ord-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:ini=
tial;text-decoration-color:initial"><span style=3D"color:rgb(34,34,34);font=
-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:=
normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-=
align:start;text-indent:0px;text-transform:none;white-space:normal;word-spa=
cing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;te=
xt-decoration-color:initial;float:none;display:inline">history-length is su=
pposed to keep a limit on the max history for save-hist-additional-variable=
s</span><span style=3D"color:rgb(34,34,34);font-family:sans-serif;font-size=
:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:nor=
mal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;=
text-transform:none;white-space:normal;word-spacing:0px;background-color:rg=
b(255,255,255);text-decoration-style:initial;text-decoration-color:initial;=
float:none;display:inline">, but it doesn&#39;t.</span><br style=3D"color:r=
gb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-v=
ariant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spa=
cing:normal;text-align:start;text-indent:0px;text-transform:none;white-spac=
e:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration=
-style:initial;text-decoration-color:initial"><br style=3D"color:rgb(34,34,=
34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-li=
gatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:norm=
al;text-align:start;text-indent:0px;text-transform:none;white-space:normal;=
word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:in=
itial;text-decoration-color:initial"><span style=3D"color:rgb(34,34,34);fon=
t-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures=
:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text=
-align:start;text-indent:0px;text-transform:none;white-space:normal;word-sp=
acing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;t=
ext-decoration-color:initial;float:none;display:inline">In the savehist-sav=
e function:</span><br style=3D"color:rgb(34,34,34);font-family:sans-serif;f=
ont-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-=
caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-ind=
ent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-=
color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:=
initial"><br style=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:=
13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:norm=
al;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;t=
ext-transform:none;white-space:normal;word-spacing:0px;background-color:rgb=
(255,255,255);text-decoration-style:initial;text-decoration-color:initial">=
<span style=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;fo=
nt-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font=
-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-tra=
nsform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,25=
5,255);text-decoration-style:initial;text-decoration-color:initial;float:no=
ne;display:inline">(dolist (symbol savehist-minibuffer-history-va</span><sp=
an style=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-=
style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-we=
ight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transf=
orm:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,2=
55);text-decoration-style:initial;text-decoration-color:initial;float:none;=
display:inline">riables)</span><br style=3D"color:rgb(34,34,34);font-family=
:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;=
font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:s=
tart;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0p=
x;background-color:rgb(255,255,255);text-decoration-style:initial;text-deco=
ration-color:initial"><span style=3D"color:rgb(34,34,34);font-family:sans-s=
erif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-va=
riant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;te=
xt-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;backg=
round-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-=
color:initial;float:none;display:inline">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 (when (and (boundp symbol)</span><br style=3D"color:rgb(34,34,34);font-fam=
ily:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:norm=
al;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-alig=
n:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing=
:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-d=
ecoration-color:initial"><span style=3D"color:rgb(34,34,34);font-family:san=
s-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font=
-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start=
;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;ba=
ckground-color:rgb(255,255,255);text-decoration-style:initial;text-decorati=
on-color:initial;float:none;display:inline">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(not (memq symbol savehist-ign=
ored-variables)))</span><br style=3D"color:rgb(34,34,34);font-family:sans-s=
erif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-va=
riant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;te=
xt-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;backg=
round-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-=
color:initial"><span style=3D"color:rgb(34,34,34);font-family:sans-serif;fo=
nt-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-c=
aps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-inde=
nt:0px;text-transform:none;white-space:normal;word-spacing:0px;background-c=
olor:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:i=
nitial;float:none;display:inline">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 (let ((value (savehist-trim-history (symbol-value symbol)))</span><br styl=
e=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:n=
ormal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40=
0;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:non=
e;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);tex=
t-decoration-style:initial;text-decoration-color:initial"><span style=3D"co=
lor:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;f=
ont-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;lette=
r-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white=
-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decor=
ation-style:initial;text-decoration-color:initial;float:none;display:inline=
">=C2=A0 =C2=A0 =C2=A0 ;;....</span><br style=3D"color:rgb(34,34,34);font-f=
amily:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:no=
rmal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-al=
ign:start;text-indent:0px;text-transform:none;white-space:normal;word-spaci=
ng:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text=
-decoration-color:initial"><span style=3D"color:rgb(34,34,34);font-family:s=
ans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;fo=
nt-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:sta=
rt;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;=
background-color:rgb(255,255,255);text-decoration-style:initial;text-decora=
tion-color:initial;float:none;display:inline">=C2=A0 ))))</span><br style=
=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:no=
rmal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400=
;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none=
;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text=
-decoration-style:initial;text-decoration-color:initial"><br style=3D"color=
:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font=
-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-s=
pacing:normal;text-align:start;text-indent:0px;text-transform:none;white-sp=
ace:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decorati=
on-style:initial;text-decoration-color:initial"><span style=3D"color:rgb(34=
,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-varian=
t-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:=
normal;text-align:start;text-indent:0px;text-transform:none;white-space:nor=
mal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-styl=
e:initial;text-decoration-color:initial;float:none;display:inline">(dolist =
(symbol savehist-additional-variables)</span><br style=3D"color:rgb(34,34,3=
4);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-lig=
atures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:norma=
l;text-align:start;text-indent:0px;text-transform:none;white-space:normal;w=
ord-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:ini=
tial;text-decoration-color:initial"><span style=3D"color:rgb(34,34,34);font=
-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:=
normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-=
align:start;text-indent:0px;text-transform:none;white-space:normal;word-spa=
cing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;te=
xt-decoration-color:initial;float:none;display:inline">=C2=A0 (when (boundp=
 symbol)</span><br style=3D"color:rgb(34,34,34);font-family:sans-serif;font=
-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-cap=
s:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent=
:0px;text-transform:none;white-space:normal;word-spacing:0px;background-col=
or:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:ini=
tial"><span style=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:1=
3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:norma=
l;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;te=
xt-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(=
255,255,255);text-decoration-style:initial;text-decoration-color:initial;fl=
oat:none;display:inline">=C2=A0 =C2=A0 (let ((value (symbol-value symbol)))=
</span><br style=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13=
px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal=
;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;tex=
t-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(2=
55,255,255);text-decoration-style:initial;text-decoration-color:initial"><s=
pan style=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font=
-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-w=
eight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,=
255);text-decoration-style:initial;text-decoration-color:initial;float:none=
;display:inline">=C2=A0 =C2=A0 (when (savehist-printable value)</span><br s=
tyle=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-styl=
e:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight=
:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:=
none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);=
text-decoration-style:initial;text-decoration-color:initial"><span style=3D=
"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:norma=
l;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;le=
tter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;wh=
ite-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-de=
coration-style:initial;text-decoration-color:initial;float:none;display:inl=
ine">=C2=A0 =C2=A0 ;; ...</span><br style=3D"color:rgb(34,34,34);font-famil=
y:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal=
;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:=
start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0=
px;background-color:rgb(255,255,255);text-decoration-style:initial;text-dec=
oration-color:initial"><span style=3D"color:rgb(34,34,34);font-family:sans-=
serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-v=
ariant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;t=
ext-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;back=
ground-color:rgb(255,255,255);text-decoration-style:initial;text-decoration=
-color:initial;float:none;display:inline">=C2=A0 =C2=A0 ))))</span><br styl=
e=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:n=
ormal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40=
0;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:non=
e;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);tex=
t-decoration-style:initial;text-decoration-color:initial"><br style=3D"colo=
r:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;fon=
t-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-=
spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-s=
pace:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decorat=
ion-style:initial;text-decoration-color:initial"><span style=3D"color:rgb(3=
4,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-varia=
nt-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing=
:normal;text-align:start;text-indent:0px;text-transform:none;white-space:no=
rmal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-sty=
le:initial;text-decoration-color:initial;float:none;display:inline">As you =
can see, the save-hist-trim-history fn is not called in the</span><br style=
=3D"color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:no=
rmal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400=
;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none=
;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text=
-decoration-style:initial;text-decoration-color:initial"><span style=3D"col=
or:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;fo=
nt-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter=
-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-=
space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decora=
tion-style:initial;text-decoration-color:initial;float:none;display:inline"=
>second code block.</span><div>
</div></div>

--0000000000005aedda0568416e4a--




Acknowledgement sent to Chris Findeisen <cfindeisen@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#30943; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.