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 15:00:01 +0100 Message-ID: References: <83legz5qsu.fsf@gnu.org> <28e951a5-7065-4c55-b6d0-88238e8cc5eb@Spark> <83jzwj5pjn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="647c98e6_5263979_436" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15919"; 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 16:01:15 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 1q5oIE-0003x5-CA for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Jun 2023 16:01:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5oI4-0003J4-Ay; Sun, 04 Jun 2023 10:01:04 -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 1q5oI3-0003Ip-4o for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2023 10:01: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 1q5oI2-0005dG-BW for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2023 10:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5oI2-0002gK-2S for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2023 10:01: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 14:01: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.168588721610234 (code B ref 63891); Sun, 04 Jun 2023 14:01:02 +0000 Original-Received: (at 63891) by debbugs.gnu.org; 4 Jun 2023 14:00:16 +0000 Original-Received: from localhost ([127.0.0.1]:46818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5oHI-0002ez-1W for submit@debbugs.gnu.org; Sun, 04 Jun 2023 10:00:16 -0400 Original-Received: from mail-wm1-f41.google.com ([209.85.128.41]:56523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5oHG-0002eU-2H for 63891@debbugs.gnu.org; Sun, 04 Jun 2023 10:00:14 -0400 Original-Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-3f623adec61so39518295e9.0 for <63891@debbugs.gnu.org>; Sun, 04 Jun 2023 07:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685887208; x=1688479208; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=H8rvqP49mw1aMtzEVtZZCUujvd++ImGKhUhlYUxmESE=; b=EsRCmSuypOgYFC5eOlm5ADJfbeiOXqxF7wy8XabmX6R9MICCQN9sNm4QqoPbEK9t3z MIUTTfEBfzOqlbXuvaiCRWq1M02Xdck32EhrXjSWtAXCvB0gM8s6XXm0bnkaINvipDNJ mMn+9yqZDtU4j+UhyQ24z5F13+Wb/hPw68ZKRB4/vbt8QikB9z88icJBNDVSqa08rjgx XnkHLl9TcpM4UiQlO0X1Ny4hMQhHjqo3oW/K0+/Juxa0uIavdoHAeVP7dvlaO4gBTSIx QAj6D5jz31szogUnCp8rGI3OygDcxSU1BkKZ9E/nRiXtvTGTIst6TApMY7Pli9PHMwY7 CbfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685887208; x=1688479208; 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=H8rvqP49mw1aMtzEVtZZCUujvd++ImGKhUhlYUxmESE=; b=ExRATk9MrsiNrSsnZPHARablHZDgGqaN30s7Bfqh+2bXauqmSJGX3hweMDMvvz1qfJ P/6U3dQz7Oc5ZNYEbks4CIqMFzBX3raJ0iYtberbqXsUCrsUFxG3Oa+H5h35qkwl884G WwZOBpLXiD6Up9Jny6zWja8YzPwi9Wp+twcbgWcR4pf5a9qGMQkqyaeXkitr9cTmanP2 W+BvDYExJ1VFf1ywadoEYMCxo9iceafnhVl5aL6g1RjJlw50inSAiGWM4NX5+EZKAaXb VDzucdXcouUItkjFdzbs/2VtuymgAxBkPm78EFWbhyBmkDWlYSX6fwmw+2D0C02kClFb +PeQ== X-Gm-Message-State: AC+VfDzdK6qUGU6348gSRiOb2wxCbfKdKVdRKgwGMUDVjBL3nvfa+pm5 kW31ORp/y5iUPgXRi60Vl0woJBxtbGw= X-Google-Smtp-Source: ACHHUZ5agv2AHCcN0wOMGAYn4vz2ccB8Et9Z1YHBTPeF3ZssBIG0r8XTuApRgB9KG8Rl/K3LyBrumQ== X-Received: by 2002:a1c:f719:0:b0:3f6:766:f76f with SMTP id v25-20020a1cf719000000b003f60766f76fmr5993222wmh.36.1685887208073; Sun, 04 Jun 2023 07:00:08 -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 f4-20020a7bc8c4000000b003f4e47c6504sm11473193wml.21.2023.06.04.07.00.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Jun 2023 07:00:07 -0700 (PDT) In-Reply-To: <83jzwj5pjn.fsf@gnu.org> X-Readdle-Message-ID: b29dfb16-e8c1-4a8b-9fce-6f8dc8aeec54@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:262952 Archived-At: --647c98e6_5263979_436 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline This branch: https://github.com/emacs-mirror/emacs/blob/emacs-29/lisp/cus= -edit.el=23L1109 No it does not saves only one variable to file, it only saves one variabl= e to file if you have only modified one variable. 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-save all have the same problem. They all call custom-save-all and = they all dump all modified customizable variable values on file without r= egard to whether it=E2=80=99s a single variable, face or a group the user= asked Emacs to save. On 4 Jun 2023 at 2:23 PM +0100, Eli Zaretskii , wrote: > > Date: Sun, 4 Jun 2023 14:02:55 +0100 > > =46rom: Jimmy Wong > > Cc: 63891=40debbugs.gnu.org > > > > Yes sorry, I mean customize-save-variable, custom-save-variable doesn= =E2=80=99t exist. There=E2=80=99s a branch in > > customize-save-variable that saves all previously updated variables t= o the custom file if it exists. > > I don't think I understand. customize-save-variable saves only a > single variable: the one whose name you type, with the value you type. > Which branch there does more, and how can you invoke that branch=3F > > > I just took a look at cus-edit.el, there appears to be no function th= at can surgically serialize just one > > variable value to the custom file. > > customize-save-variable is that function. --647c98e6_5263979_436 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
This branch: https://github.com/emacs-mirror/emacs/= blob/emacs-29/lisp/cus-edit.el=23L1109

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

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-save all have the same problem. They all call custom-save-all and = they all dump all modified customizable variable values on file without r= egard to whether it=E2=80=99s a single variable, face or a group the user= asked Emacs to save.
On 4 Jun 2023 at 2:23 PM +0100, Eli= Zaretskii <eliz=40gnu.org>, wrote:
Date: Sun, 4 Jun 2023 14:02:55 +0100
=46rom: Jimmy Wong <wyuenho=40gmail.com>
Cc: 63891=40debbugs.gnu.org

Yes sorry, I mean customize-save-variable, custom-save-variable doesn=E2=80= =99t exist. There=E2=80=99s a branch in
customize-save-variable that saves all previously updated variables to th= e custom file if it exists.

I don't think I understand. customize-save-variable saves only a
single variable: the one whose name you type, with the value you type. Which branch there does more, and how can you invoke that branch=3F
=
I just took a look at cus-edit.el, there ap= pears to be no function that can surgically serialize just one
variable value to the custom file.

customize-save-variable is that function.
--647c98e6_5263979_436--