From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.devel Subject: Re: Turning on savehist-mode by default Date: Tue, 28 Nov 2023 15:07:46 -0600 Message-ID: <7a6d16c5-90ff-4c5b-be0f-cd19c272eada@alphapapa.net> References: <83a5qy7xjx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39869"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-devel@gnu.org, public@thanosapollo.org To: eliz@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 28 22:08:51 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r85K6-000A5C-TJ for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Nov 2023 22:08:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r85JI-0001WH-SB; Tue, 28 Nov 2023 16:08:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r85JD-0001SB-6h for emacs-devel@gnu.org; Tue, 28 Nov 2023 16:07:56 -0500 Original-Received: from snail.cherry.relay.mailchannels.net ([23.83.223.170]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r85JA-0002wd-Pu; Tue, 28 Nov 2023 16:07:54 -0500 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 339BD802FD5; Tue, 28 Nov 2023 21:07:49 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a231.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 82BFF803019; Tue, 28 Nov 2023 21:07:48 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1701205668; a=rsa-sha256; cv=none; b=NoTz4IMkZEoQnm9uoP+dUbaTDBk8Msg/ZznKHiOc4CWjz9/li0aqVPKM3/fl5Gf0JMQL4T 8/FYbTwtq0EFt0OoYHU7fEbikKXkAaT2JEvaWRNouDASalTyq2ojb/PcC57d5px8bweEfE 2GWV+qxdHamYOBeqGQ2LmMw62zZapuZtaS3mB0mJ/8rXnrJJf6fVgTsrXMEHE6gFa/dbIy NEfk+jaAWh2ezaPnVdtp0b8hFF20gWk2fjEeKJT9PjFKVxroKdFCq5z18Nx73ABwDMOXXv 6f0t/k0OlLmDM/fGF7d0BbwpwC5AMe56urKipPPKUH1MjcookIQJpQN4ecHcpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1701205668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=M1YHcTd/WNerbdy7OcpJb8QYrDcXOlcP0oFi8cMmO1w=; b=t6lPS7vOKtIKKp+SuQIkV33l3NgqXgn9F242Es+xANfzA9IAmgFYFiSyAZV5HeOGlXjRpd /2zKANXCyLCyy/XXIA2pRNRvbrabmMNGaorqE0N9VzEshBvEATkeauiWvrspIOFpPL8+fy YqAUO3EipHxfGHS1oZ+3ILgEdV4dYphw1Nz3aozlPa4Sl6oVakFWXVLpnyhN8ULd05kon8 2jk/6ZO6ciAX46MgCImjeKY6ZiFIppPWTqZi2vaADWS8hW7ld/hZmsGw3qZiJiTvJ1kvg8 1iCN1Ewaj6guNrcZMqh4gr3v+J6uwnlN2I/DtTB98Zb5VyL/FWtgcJdXzSPuZQ== ARC-Authentication-Results: i=1; rspamd-d88d8bd54-8f9qc; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Suffer-Attack: 2901001f70d44fad_1701205669000_2204490228 X-MC-Loop-Signature: 1701205669000:87946839 X-MC-Ingress-Time: 1701205669000 Original-Received: from pdx1-sub0-mail-a231.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.96.209.6 (trex/6.9.2); Tue, 28 Nov 2023 21:07:48 +0000 Original-Received: from [10.66.0.154] (unknown [91.193.232.98]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a231.dreamhost.com (Postfix) with ESMTPSA id 4Sfw5b65yFz73; Tue, 28 Nov 2023 13:07:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1701205668; bh=M1YHcTd/WNerbdy7OcpJb8QYrDcXOlcP0oFi8cMmO1w=; h=Date:To:Cc:Subject:From:Content-Type:Content-Transfer-Encoding; b=ZAmgc6g9IPyPVp4WH3sEA9n25n3k9uV5kLr5P1o5Zij029180DwZUaCSDeyfcZoJk tueP5MLO6lDyMpQ4ls884XJivcuK/cy8KK01erf8bpDqPisaw45UirSntqO+OW2yrx vIUvnSMzxC2Bv/bxhMOaBwiD1Cygo7Hus5e+gY5Dejeyw7Zg0erGHNIDASEWVdsyNL i5uOyipKp1xTfx5th5AbZEWW0H2IKYF07lb/wH2T3Iwi5leszZDAXbxgcmXfWVkIDa MRB6jA1ZKfC/p3sLwtxclisBQAo2+7IotxxxVoGRcFnlwp1KStboyk9J3ZirH8o8Jf PeWFFCRA3v2MA== Content-Language: en-US In-Reply-To: <83a5qy7xjx.fsf@gnu.org> Received-SPF: neutral client-ip=23.83.223.170; envelope-from=adam@alphapapa.net; helo=snail.cherry.relay.mailchannels.net X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313337 Archived-At: FWIW, IME, it may not be a good idea to enable savehist-mode by default. As an example, see this issue report on Ement.el's repository: https://github.com/alphapapa/ement.el/issues/216 The gist is that, for users who enabled savehist, it was saving the variable command-history, which included some complex commands whose arguments (from interactive completion) included large data structures (which are hidden from the user when called interactively). This resulted in savehist files hundreds of MB in size and very noticeable pauses whenever savehist saved its data, from timers and upon Emacs exit. The worst part was how long it took to discover the source of the problem. There were intermittent reports of weird pauses for months, without any discernible reason, until a user finally narrowed it down to using savehist. Then we had to add this hacky workaround in Ement to try to automatically avoid the problem. Such cases may be rare (or not--I can't say), but when it happens, it seems to be a bear to deal with, being very unintuitive. For myself, even having written a number of Emacs packages, I wasn't yet aware of the command-history variable and how it saves arguments, and certainly not the implications of using savehist as well. --Adam