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: Sat, 16 Dec 2023 23:42:15 -0600 Message-ID: <461a0999-6005-4aa4-a4b3-988123855f92@alphapapa.net> References: 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="21135"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: eliz@gnu.org, emacs-devel@gnu.org, sbaugh@catern.com, stefankangas@gmail.com To: luangruo@yahoo.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 17 06:43:32 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 1rEjw3-0005I2-MO for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Dec 2023 06:43:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEjv2-00044r-El; Sun, 17 Dec 2023 00:42:28 -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 1rEjuy-00044b-TV for emacs-devel@gnu.org; Sun, 17 Dec 2023 00:42:25 -0500 Original-Received: from bumble.maple.relay.mailchannels.net ([23.83.214.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEjuw-0004LH-Pv; Sun, 17 Dec 2023 00:42:24 -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 9B1B7361311; Sun, 17 Dec 2023 05:42:20 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a258.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id EB43E361287; Sun, 17 Dec 2023 05:42:19 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1702791740; a=rsa-sha256; cv=none; b=haTUAyjnZAABNpKQzBc1DuitO3OK3dRoGcy00gJTZRxjUroYsHnqm5hbp53/D+va9QXNcG ET1fZlJvyLWpcliT80S8B3WoGzL0peXtyaA13yvMbCcbwBXa9EnIuaIvH3yXq5/7xoTn+j L8HHScRK3vwT9dar2evLMvHXDGhrcvWSATeJ6+O0nZmTyryRa9NkjylMqKLGQuCxsdM8Uc BA9/mwZSH6tgztPIqzOS43mJclr5EQZ4ppQnw8C2jOwO1+IbL8Tstk/CbP+r0lnBZrl6ZY wjHAYv1fFracVEbXQ+LmqQNCmynuMFSgflPA4QXfMuVbjD3IPJJ6Ao5wRaV00Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1702791740; 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=lypoi8TEnt/UiH2F0QVXD1ReKu53snAfFgc17VI4PuI=; b=pFlljtbHMzOaKUevn2iAUoAj0rRA6M4UQKTi79sYEQa42ZwtS1wGmx2mKN/yCGCxaOsy0f P2qIDfMML8+G+fOlQaPR1gLFk6k1M6TnJpKujhipffOnRel0N6BBdX73TZthSUFDjOu1hc dhaYlUOl9Iq53aDMCqFeT84/sqp6y/XR2BhwFdBnXEhM111HReO4qiE94bx7zmmfWxOT6h 8FdCFo6R5NCTvmXOkZ4P6KeT/e1wNGA9u9S1iOUCKw7yzOmyg9wcADLQjUC0UoNr1i/FGL Pixh2GYMPvVT5pmpigC6NXrg96I9paImiFJ13VYI+GiltlmCW4fxnFtP6uN+UA== ARC-Authentication-Results: i=1; rspamd-856c7f878f-bssp4; 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-Stop-Invention: 77e912615673322b_1702791740447_3118798368 X-MC-Loop-Signature: 1702791740447:1962975413 X-MC-Ingress-Time: 1702791740447 Original-Received: from pdx1-sub0-mail-a258.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.122.88.224 (trex/6.9.2); Sun, 17 Dec 2023 05:42:20 +0000 Original-Received: from [10.66.0.42] (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-a258.dreamhost.com (Postfix) with ESMTPSA id 4StBfz0jNwzPX; Sat, 16 Dec 2023 21:42:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1702791739; bh=lypoi8TEnt/UiH2F0QVXD1ReKu53snAfFgc17VI4PuI=; h=Date:To:Cc:Subject:From:Content-Type:Content-Transfer-Encoding; b=wF7vTduH5iw6yPhYYCR/Uex6J5EdJPsngDu1GLi6zwY8kQZ4WmB0RLb12EPSzTEqG qTc5ErARGYWVI/Sp26lXteK8FLnYlNyMM+iFv89H+/OLvwOjHmPAkOS8YHt9ZMkhcz mPgYh/zKHmW5fH3ha7pm3swqsMpQn3T/nfaTMj0+pEtyEEbfSuF4LFBmz8GDbnBwCF xBHrWq6pPGv8vyxp0DBuD/7Vb4fVyz0zkF2sQK9TVQdznxhRFkJH/fAAC7LH+Vfp/B scVm1TWtzCS3hBi6OBIBjFvqdpCpHUWJ9V8/tHIWPT/td/GnV1P/idVhQ4/52KTYLK vZ4VqqMMwwX2w== Content-Language: en-US In-Reply-To: Received-SPF: neutral client-ip=23.83.214.25; envelope-from=adam@alphapapa.net; helo=bumble.maple.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_H5=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:313899 Archived-At: In addition to what Po said, I'd like to gently reiterate what I said earlier in this thread: Given my experience with savehist causing unexpected and hard-to-debug performance problems[0], I'd guess that there are more such cases in the wild waiting to be triggered. If, e.g. Emacs 30.1 enabled it by default, I can imagine a number of users suddenly encountering weird pauses, and they'd probably blame GC initially[1]. As well, I have some concerns about savehist's having the potential to cause weird bugs in other libraries: The savehist-save function seems to comment out individual elements of savehist-minibuffer-history-variables that it determines are unreadable. That's understandable from its perspective, but what effect will that have on libraries that may not be expecting for their data structures to have certain parts disappear after restarting Emacs? I can just imagine the bug reports from users showing apparently corrupted or elided data structures, and having no clue as to what is mutating them, because the code isn't within the library having a bug reported against it. IMHO, a feature like this is indeed expected and overdue in Emacs, but I don't think savehist is a good way to enable it, given its current implementation. ISTM that something built on top of the new multisession library would be more appropriate and (at least, have the potential to be) more robust. If savehist is to be used for this, I would at least recommend taking a release cycle to publicly ask users to enable it by default and report the results, and wait for at least a few hundred positive reports before enabling it by default. Otherwise, I would expect not-insignificant fallout, IMHO. Thanks, Adam 0: https://github.com/alphapapa/ement.el/issues/216 1: Which may, in fact, be part of the problem, considering how savehist-save works: it prints a Lisp object to a buffer, then tries to read it to determine whether it's readable--doesn't that generate garbage? Now consider doing that every 1-5 minutes and upon exit.