GNU bug report logs - #72156
31.0.50; defcustom set issue

Previous Next

Package: emacs;

Reported by: Ergus <spacibba <at> aol.com>

Date: Wed, 17 Jul 2024 12:10:01 UTC

Severity: normal

Merged with 72404

Found in versions 30.0.60, 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 72156 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: spacibba <at> aol.com, maurooaranda <at> gmail.com
Cc: 72156 <at> debbugs.gnu.org, Stephen Berman <stephen.berman <at> gmx.net>
Subject: Re: bug#72156: 31.0.50; defcustom set issue
Date: Sun, 04 Aug 2024 10:38:42 +0300
merge 72156 72404
thanks

> Cc: 72156 <at> debbugs.gnu.org
> Date: Sat, 20 Jul 2024 11:50:47 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Date: Wed, 17 Jul 2024 14:08:59 +0200
> > From:  Ergus via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> > 
> > 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.

This actually seems to be the same problem as bug#72404, since the fix
proposed by Stephen there fixes this one as well.  So I'm merging them.




This bug report was last modified 131 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.