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#72156: 31.0.50; defcustom set issue Date: Sat, 20 Jul 2024 11:50:47 +0300 Message-ID: <86le1we9aw.fsf@gnu.org> References: <87le206x0k.fsf.ref@aol.com> <87le206x0k.fsf@aol.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38507"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72156@debbugs.gnu.org To: Ergus , Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 20 10:51:17 2024 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 1sV5oC-0009pv-Ss for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Jul 2024 10:51:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sV5o0-0007Ee-1t; Sat, 20 Jul 2024 04:51: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 1sV5ny-0007E7-6p for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2024 04:51:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sV5nx-0008RE-Uq for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2024 04:51:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sV5nx-0006U7-V9 for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2024 04:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Jul 2024 08:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72156 X-GNU-PR-Package: emacs Original-Received: via spool by 72156-submit@debbugs.gnu.org id=B72156.172146545924918 (code B ref 72156); Sat, 20 Jul 2024 08:51:01 +0000 Original-Received: (at 72156) by debbugs.gnu.org; 20 Jul 2024 08:50:59 +0000 Original-Received: from localhost ([127.0.0.1]:51663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sV5nv-0006Tq-4Z for submit@debbugs.gnu.org; Sat, 20 Jul 2024 04:50:59 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sV5nt-0006Tb-4N for 72156@debbugs.gnu.org; Sat, 20 Jul 2024 04:50:57 -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 1sV5nn-0008Qh-N5; Sat, 20 Jul 2024 04:50:51 -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=B46mgrnPCg2AQk0VnM69wKh06h11/t5OdNKROVIfhcY=; b=U28KIn7u8iqW KIPxXRFHzDAG4K37bBEyzCl5dD3z/4i1n05xstPvo6afYpRAvn8Gr4UQ0phE38JvDL6mrR4EZ69Wq +HlEy7lcPwlZ2/QTHbzwjWb6RNL+TPPQ+AYuTRBiqUsY8Xg7u2CVsSUa2Wvzt/cFH6xCSGGmkGPlN q6RrkF1QeS0o4ZCChZzMaP05LSkv7nCwhS+fF2PDQVpdwWvONkD5wVTs1hXvisCxzd9KDGNY2xFG/ wa668iA0ZG7UAF2I05Z/cOqyPQ5UeRReClCug0i8d+/cNAZU7rcU7VrEKaRDQ9Hfb1My/wOkVDRI8 lVUWcMqEhvJFFZYCoLM4XA==; In-Reply-To: <87le206x0k.fsf@aol.com> (bug-gnu-emacs@gnu.org) 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:289014 Archived-At: > Date: Wed, 17 Jul 2024 14:08:59 +0200 > From: Ergus via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > I have this defcustom: > > ``` > (defcustom gtags-mode-features '(control meta) > "HELLO WORLD" > :type '(set (const control) > (const meta) > (const shift) > (const hyper) > (const super) > (const alt))) > ``` > > When I try the customize-variable I get this: > > ``` > Hide Gtags Mode Features: > Set: > [X] control > [X] meta > [ ] shift > [ ] hyper > [ ] super > [ ] alt > [ State ]: EDITED, shown value does not take effect until you set or save it. > HELLO WORLD > Groups: [Gtags Mode] > ``` > > But, if I do the next change and save > > > ``` > Hide Gtags Mode Features: > Set: > [X] control > [X] meta > [X] shift > [ ] hyper > [ ] super > [ ] alt > [ State ]: EDITED, shown value does not take effect until you set or save it. > HELLO WORLD > Groups: [Gtags Mode] > ``` > > The customize variable value saved is: > > '(gtags-mode-features3 '(shift)) > > it only saved the "new" value and ignores the previous > existing ones. > > When I restart and check the variable's value I get as expected '(shift) > and lost the control and meta. > > Going to customize-variable again I get: > > ``` > Hide Gtags Mode Features: > Set: > [ ] control > [ ] meta > [X] shift > [ ] hyper > [ ] super > [ ] alt > [ State ]: EDITED, shown value does not take effect until you set or save it. > HELLO WORLD > Groups: [Gtags Mode] > ``` > > Consistent with the variable value, but inconsistent with what was > actually saved before. > > IF instead of selecting a new value I un-select some, then variable > saves nil and will be nil. This seems to be some bug in handling the 'set' type of defcustoms. I see the same problem when customizing completions-merging-modes from completion.el. Perhaps Mauro (CC'ed) could chime in and suggest how to solve this.