From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jimmy Wong 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, 4 Jun 2023 17:49:31 +0100 Message-ID: <8b93a39b-8c5c-4fee-b5c8-0668d5926abc@Spark> References: <83legz5qsu.fsf@gnu.org> <28e951a5-7065-4c55-b6d0-88238e8cc5eb@Spark> <83jzwj5pjn.fsf@gnu.org> <83h6rn5mn0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="647cc0a1_37a35d46_436" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3178"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63891@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 04 18:50:18 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 1q5qvq-0000co-GM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Jun 2023 18:50:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5qvg-0004Q5-PC; Sun, 04 Jun 2023 12:50:08 -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 1q5qvc-0004OF-2K for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2023 12:50:06 -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 1q5qva-0004iU-UK for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2023 12:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5qva-0007aV-FK for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2023 12:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jimmy Wong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Jun 2023 16:50: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.168589738729142 (code B ref 63891); Sun, 04 Jun 2023 16:50:02 +0000 Original-Received: (at 63891) by debbugs.gnu.org; 4 Jun 2023 16:49:47 +0000 Original-Received: from localhost ([127.0.0.1]:47019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5qvK-0007Zy-Fj for submit@debbugs.gnu.org; Sun, 04 Jun 2023 12:49:46 -0400 Original-Received: from mail-wm1-f51.google.com ([209.85.128.51]:54517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5qvI-0007Zj-5C for 63891@debbugs.gnu.org; Sun, 04 Jun 2023 12:49:44 -0400 Original-Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-3f7368126a6so5802555e9.0 for <63891@debbugs.gnu.org>; Sun, 04 Jun 2023 09:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685897378; x=1688489378; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=+se8J70dTmNYQLVNOQmb63mss+RbHhe6EDfwxWgZXE0=; b=SUj0MzFoDmJT4QjvQgZpIlXEvUZkfraAHrOeBVAPhll1z++I+GrUI53ufb1T2Qh4rI 3u1Fo9dgKpno0P/tXZ4xs57naktSR3teuPScRa+O8MRnHHpEYPClbFpEU1qDOIqonCH6 saE6Uib+gVo3T6oGkwVr25Cj1Q1xGoCrYp465YQELP9YTxqnpqkXiwef90Cz+6MuGB73 E9VN54D7JvGVFA/Tj6N5PZgLFE2C4NBgO30r7aJL4dgtXbomzfN4BVLeBF0VRCfZ3EtB NIDRD+mkwgnYOXwhlzf0+ucQd4CMFsPayrE4shj0CftGVaggkyib6VPnr89jP8jI51Yj CkfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685897378; x=1688489378; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+se8J70dTmNYQLVNOQmb63mss+RbHhe6EDfwxWgZXE0=; b=KKKV3B1/xWw2zJ5VrxBc16GYx9zKGIXNVuFn37sEUWwycF6tAsVNr6GJDJekIxhwJx zaslJJG0lRNxdIzQOcAsXgb3yU11RE72LwGq5fjiwDpfuSri8Wqzisyot5Zn3ZoqVqWI okq2cgOnbDESSMJCRM4gQWaj/yJ1qcGZeQx6dXZjF6Sy0PxWptySRu3r5ZSGZ8srlZeH MFPBN789HP64Hy8hB5vjjhlRUaaCQO93y4LogEwelCmlRK8wRzKBWAXa6a3tmK+/m021 n4wurfULapXjRIOPVqVShzxYpyuWwboUv0ziGUiCEo6CkXDNslkrgQ8R56V20FEGmo0f ZY9A== X-Gm-Message-State: AC+VfDzXcG4Oge2nzEs9VdrILRX8drtvJDXhO3xUP9SUhyLHqAdC2l3o reOKAETTnlrbvhD+uWIG8R1A+wJ6XVY= X-Google-Smtp-Source: ACHHUZ4GueiuzWTM8tgPLD5EtK/oaK6FzleAi5U4puI+X1F49M0kwSCCFoq039j9f4uZHnpn4VmQWg== X-Received: by 2002:a05:600c:2906:b0:3f6:91c:4e86 with SMTP id i6-20020a05600c290600b003f6091c4e86mr5300370wmd.3.1685897378098; Sun, 04 Jun 2023 09:49:38 -0700 (PDT) Original-Received: from [2a01:4b00:89a0:2400::ffff:ffff] ([2a01:4b00:89a0:2400:6063:8212:189a:b65]) by smtp.gmail.com with ESMTPSA id s19-20020a7bc393000000b003f4248dcfcbsm11950681wmj.30.2023.06.04.09.49.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Jun 2023 09:49:37 -0700 (PDT) In-Reply-To: <83h6rn5mn0.fsf@gnu.org> X-Readdle-Message-ID: 8b93a39b-8c5c-4fee-b5c8-0668d5926abc@Spark 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:262975 Archived-At: --647cc0a1_37a35d46_436 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Ok you are right, the problem seems to be somewhere in Tramp on require t= hat sets the saved-value symbol property of connection-local-profile-alis= t and connection-local-criteria-alist without them being written to file,= even when enable-connection-local-variables is set to nil. When custom-s= ave-all naively scans the obarray for symbols, sees these variables havin= g saved-value set without going through the customize machinary, it assum= es they are saved to a file and saves them again. On 4 Jun 2023 at 3:25 PM +0100, Eli Zaretskii , wrote: > > Date: Sun, 4 Jun 2023 15:00:01 +0100 > > =46rom: Jimmy Wong > > Cc: 63891=40debbugs.gnu.org > > > > This branch: https://github.com/emacs-mirror/emacs/blob/emacs-29/lisp= /cus-edit.el=23L1109 > > I don't know what that is. I'm using the Emacs Git repository, the > emacs-29 branch. > > > No it does not saves only one variable to file, it only saves one var= iable to file if you have only modified > > one variable. > > That's not what I see. I've modified several options using the > menu-bar's Options menu, then typed > > M-x customize-save-variable RET truncate-lines RET y > > and saw that only truncate-lines was written to the custom file. > > If you see something else, please show a complete recipe that > reproduces the behavior you see. > > > As a matter of fact, custom-variable-save, custom-variable-mark-to-re= set-standard, > > custom-face-save, custom-face-mark-to-reset-standard and custom-group= -save all have the same > > problem. They all call custom-save-all and they all dump all modified= customizable variable values on > > file without regard to whether it=E2=80=99s a single variable, face o= r a group the user asked Emacs to save. > > I wasn't talking about custom-save-all -- that indeed saves all the > options customized in this session. I was talking about > customize-save-variable, which prompts for a single variable and its > value, and saves only that single variable, at least in my testing. --647cc0a1_37a35d46_436 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Ok you are right, the problem seems to be somewhere= in Tramp on require that sets the saved-value symbol property of connect= ion-local-profile-alist and connection-local-criteria-alist without them = being written to file, even when enable-connection-local-variables is set= to nil. When custom-save-all naively scans the obarray for symbols, sees= these variables having saved-value set without going through the customi= ze machinary, it assumes they are saved to a file and saves them again.
On 4 Jun 2023 at 3:25 PM +0100, Eli= Zaretskii <eliz=40gnu.org>, wrote:
Date: Sun, 4 Jun 2023 15:00:01 +0100
=46rom: Jimmy Wong <wyuenho=40gmail.com>
Cc: 63891=40debbugs.gnu.org

This branch: https://github.com/emacs-mirror/emacs/blob/emacs-29/lisp/cus= -edit.el=23L1109

I don't know what that is. I'm using the Emacs Git repository, the
emacs-29 branch.

No it does not saves only one variable to f= ile, it only saves one variable to file if you have only modified
one variable.

That's not what I see. I've modified several options using the
menu-bar's Options menu, then typed

M-x customize-save-variable RET truncate-lines RET y

and saw that only truncate-lines was written to the custom file.

If you see something else, please show a complete recipe that
reproduces the behavior you see.

As a matter of fact, custom-variable-save, = custom-variable-mark-to-reset-standard,
custom-face-save, custom-face-mark-to-reset-standard and custom-group-sav= e all have the same
problem. They all call custom-save-all and they all dump all modified cus= tomizable variable values on
file without regard to whether it=E2=80=99s a single variable, face or a = group the user asked Emacs to save.

I wasn't talking about custom-save-all -- that indeed saves all the
= options customized in this session. I was talking about
customize-save-variable, which prompts for a single variable and its
value, and saves only that single variable, at least in my testing.
=
--647cc0a1_37a35d46_436--