From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63891: 29.0.91; customize-save-variable should not save all variables if a custom file exists Date: Sun, 04 Jun 2023 15:56:49 +0300 Message-ID: <83legz5qsu.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38364"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63891@debbugs.gnu.org To: Jimmy Yuen Ho Wong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 04 14:57:23 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1q5nIR-0009j6-1K for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Jun 2023 14:57:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5nIA-0001O7-CO; Sun, 04 Jun 2023 08:57:06 -0400 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 1q5nI7-0001HA-5i for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2023 08:57:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q5nI6-0006rA-SK for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2023 08:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5nI6-0000NW-92 for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2023 08:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Jun 2023 12:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63891 X-GNU-PR-Package: emacs Original-Received: via spool by 63891-submit@debbugs.gnu.org id=B63891.16858833641369 (code B ref 63891); Sun, 04 Jun 2023 12:57:02 +0000 Original-Received: (at 63891) by debbugs.gnu.org; 4 Jun 2023 12:56:04 +0000 Original-Received: from localhost ([127.0.0.1]:45313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5nH9-0000M1-Sq for submit@debbugs.gnu.org; Sun, 04 Jun 2023 08:56:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5nH8-0000Lf-Iz for 63891@debbugs.gnu.org; Sun, 04 Jun 2023 08:56:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5nH3-0006ch-99; Sun, 04 Jun 2023 08:55:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=c89BkPrSw7VOIjH9H6k+/m6OggmBoYoVkwDrUNfjqxk=; b=acWPScl8XZGv lmMN2lbc28GIT4ub8+8bXN65Gtzw5s4OGtrvHCo73W62AN8BnR8QPvXOxSW1b8YGkHqVDGA1N78li 0y05JT5Lg6EPungRmKmSyJjWYM7OzMdiZ69Yv9/ACflxkIWfUloiUX+KJaOJkofL5/iWGpH88t+jm i9jHG0UoNWBN/LslMSsNr9VoJ5kmirdvk5ZNjAqe49DqEAwkcJ5NnPvgUr10+ziTQ/1+QY16N1YBD mMexPCiJQ2Xu0MnmjUKAf2//CklZ70JBMhXzjt1WFv62bD/jfb0I5KURS52UW+VKrYMYK4gToA9aV /Rvw/xHHMhYv4yNFEs4JdA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5nH2-00011r-Pa; Sun, 04 Jun 2023 08:55:57 -0400 In-Reply-To: (message from Jimmy Yuen Ho Wong on Sun, 04 Jun 2023 13:36:30 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262948 Archived-At: > From: Jimmy Yuen Ho Wong > Date: Sun, 04 Jun 2023 13:36:30 +0100 > > > As a discussion from bug #63300, it appears this long standing > undocumented behavior of `custom-save-variable` is coming into conflict > with the introduction of `connection-local-*` variables being user > customizable and the fact that Tramp in Emacs 29 sets them on > load. Here's a scenario where the combination of these behaviors results > in one too many surprises: > > 0. (setf custom-file "~/.emacs.d/custom.el") > 1. M-x load-library tramp (or install a package that transitively > requires tramp, without the user knowning) > 2. Now `connection-local-profile-alist` and > `connection-local-criteria-alist` are set by > `hack-connection-local-variables-apply`. > 3. M-x list-packages > 4. Installs a new package > 5. Now in addition to `package-selected-packages` being updated, 2 > gigantic variables are also saved. Since these connection-local > variables are highly machine, application and connection dependent, > saving them into the custom file will make it very annoying to be shared > across multiple machines. This violates the principle of least > astonishment. I think the connection-local variables should be simple variables, initialized from corresponding user options. Then Tramp could hack the variables without fear of clobbering user customizations. Michael, can this be done on emacs-29 safely enough? > Expectation: > > `custom-save-variable` should only save the value of one variable > regardless of whether a custom file exists. How is custom-save-variable involved in the above scenario? And what is custom-save-variable? did you mean customize-save-variable instead? That one does save just one variable, the one you type at the prompt.