From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Omar =?UTF-8?Q?Antol=C3=ADn?= Camarena Newsgroups: gmane.emacs.bugs Subject: bug#60712: 28.2; customize-set-variable won't let you change the type of a choice Date: Tue, 10 Jan 2023 11:35:46 -0600 Message-ID: <87zgaq2sy5.fsf@penguin> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35227"; mail-complaints-to="usenet@ciao.gmane.io" To: 60712@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 10 18:40:56 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 1pFIcK-0008cq-PX for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Jan 2023 18:40:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFIYb-0002NW-BZ; Tue, 10 Jan 2023 12:37:05 -0500 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 1pFIYZ-0002Mk-1D for bug-gnu-emacs@gnu.org; Tue, 10 Jan 2023 12:37:03 -0500 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 1pFIYY-0000rs-P7 for bug-gnu-emacs@gnu.org; Tue, 10 Jan 2023 12:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pFIYY-0006T7-8f for bug-gnu-emacs@gnu.org; Tue, 10 Jan 2023 12:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Omar =?UTF-8?Q?Antol=C3=ADn?= Camarena Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Jan 2023 17:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60712 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167337216824783 (code B ref -1); Tue, 10 Jan 2023 17:37:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Jan 2023 17:36:08 +0000 Original-Received: from localhost ([127.0.0.1]:41050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFIXf-0006Re-WF for submit@debbugs.gnu.org; Tue, 10 Jan 2023 12:36:08 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:50848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFIXe-0006RV-Ab for submit@debbugs.gnu.org; Tue, 10 Jan 2023 12:36:06 -0500 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 1pFIXT-0001sy-Vc for bug-gnu-emacs@gnu.org; Tue, 10 Jan 2023 12:35:56 -0500 Original-Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pFIXR-0000bn-NO for bug-gnu-emacs@gnu.org; Tue, 10 Jan 2023 12:35:55 -0500 Original-Received: by mail-oi1-x22c.google.com with SMTP id r132so129694oif.10 for ; Tue, 10 Jan 2023 09:35:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=/+/fCyWw1onNWRgQ3EqZMUI5p4IMfCLcnygqPenNzsQ=; b=fANKie5DbJlYAKy+R7vMDsCz3OFhdBuO8TifMFltaAKfbpObZhtUikZLda03XZ9Seh RLjAMEWDCnWGu4yZcnS4IwubN/NS/if9b4GQVY7y+2CBXio8mbHdCrxG80cSYbJjueUU EH5GKrZ1oDcUQXO+7bg3IO8TfrsdzxhayAm5SrIXuzWUnOcGln2dGVEGa3KxzUC4BNY0 lI+JBiGp2ljvjQPpPVmXieszEU8rRYnDBGZtlUtovsCR6VR2bUS9RcDzXnSoXO7aJVnP LEFMk+IiPmoOp8Yj1jKOy2TBDQMtUb6aXiuxp21j9/lxvubJsemuaz696S0zdlO8DOcA 21Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/+/fCyWw1onNWRgQ3EqZMUI5p4IMfCLcnygqPenNzsQ=; b=jfPmboXPw+CI0DaE8rpf7lfUQakhYx8EoB48lodV1df9qQZlgfND8po0S9rB5C8MmI RdkIrmKZDTE+srM5Pjk+DY8qqjDQrxobx9JuS99Py6xV+mcrBDgLEO8HNF5y5FpEybd0 lIWzMiDwM5WBwoMyVG0HLqbA3MAbOgtPLpmYyaXUq+cLbA0WkIs9gmm2hDnqRftw6L2S zRnT97vLaqT2Ku+/wTH/MROYvSDWCrRngypRHbbKLteqjB7rsFn2rRnKed1Xm21PaidY rF0vts4KXTURwLUei1BtwQmKdoZ8YOlfssIx9cGR7r3GcRrEd8fXmkUqzpxsOED527na adWA== X-Gm-Message-State: AFqh2krkBHuTsw25iFQhcSHLlbLj609D6OL5NmFIq+BOApszXAv+EXwW ZWUUVArgDZtsFZDRVcvpcoC8HGTkMH8= X-Google-Smtp-Source: AMrXdXvSxsRpduI39ZlVD1cNmPPyIQF7+zGfUROBPNeYZ/hwzZcjmMV+prl9bVjAHHnE41nFwUw1Hg== X-Received: by 2002:a05:6808:318:b0:35c:1be2:ff86 with SMTP id i24-20020a056808031800b0035c1be2ff86mr31353760oie.39.1673372150578; Tue, 10 Jan 2023 09:35:50 -0800 (PST) Original-Received: from penguin ([201.137.16.165]) by smtp.gmail.com with ESMTPSA id ca18-20020a056830611200b0066e873e4c2csm6631531otb.45.2023.01.10.09.35.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 09:35:50 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::22c; envelope-from=omar.antolin@gmail.com; helo=mail-oi1-x22c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:253091 Archived-At: If you declare a user option as follows: (defcustom bool-or-alist '((a . 4) (b . 7)) "A made up option to illustrate a problem." :type '(choice boolean (alist :key-type symbol :value-type integer))) And then run M-x customize-set-variable to change the value to t the change fails with the message: widget-prompt-value: Value does not match alist type That :type specification works just fine with the customize UI using customize-variable, it's just a problem with customize-set-variable. I think the problem is that widget-choice-prompt-value figures which branch of the choice the variable currenty has and then expects the new type to be the same. If you tag everything, then customize-set-variable works just fine: (defcustom bool-or-alist '((a . 4) (b . 7)) "A made up option to illustrate a problem." :type '(choice (const :tag "Yes" t) (const :tag "No" nil) (alist :tag "An alist" :key-type symbol :value-type integer))) In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0) of 2022-10-25, modified by Debian built on x86-conova-01 Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Debian GNU/Linux 11 (bullseye) Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-native-compilation --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-native-compilation --with-cairo --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -ffile-prefix-map=/build/emacs-mlMHQs/emacs-28.2+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: shell-dirtrack-mode: t global-org-modern-mode: t outline-minor-mode: t beginend-global-mode: t beginend-prog-mode: t marginalia-mode: t vertico-multiform-mode: t vertico-mode: t minibuffer-electric-default-mode: t minibuffer-depth-indicate-mode: t repeat-mode: t recentf-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tab-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /home/omarantolin/.emacs.d/elpa/transient-20230107.1528/transient hides /usr/share/emacs/28.2/lisp/transient Features: (shadow emacsbug vc-git vc-dispatcher ispell shell various-toggles time smiley gnus-async gnus-bcklg gnus-ml disp-table mailalias qp message-extras smtpmail sendmail sort hippie-exp gnus-cite mail-extr face-remap ecomplete nndraft nnmh utf-7 gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp gnus-cache gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus nnheader xref consult-icomplete icomplete flymake-proc flymake project osm-ol org-modern org-config my-website org-extras embark-org org-element avl-tree generator org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601 ol org-keys oc org-compat advice org-macs org-loaddefs format-spec cal-menu calendar cal-loaddefs pcase dash s modus-vivendi-tinted-theme modus-vivendi-theme modus-vivendi-deuteranopia-theme modus-operandi-tinted-theme modus-operandi-deuteranopia-theme compile find-func autoload radix-tree lisp-mnt tar-mode arc-mode archive-mode mm-archive message dired dired-loaddefs rfc822 mml mml-sec epa derived gnus-util rmail rmail-loaddefs time-date mailabbrev gmm-utils mailheader mm-decode mm-bodies mm-encode mail-utils mule-util executable cus-edit cus-start cus-load gnutls network-stream url-http mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm rmc puny url-cache url-auth epg rfc6068 epg-config noutline outline gap-config gap-mode gap-process comint ansi-color ring email-config smerge-mode diff pdf-loader cdlatex reftex reftex-loaddefs reftex-vars diff-mode diminish beginend consult-imenu imenu embark-this-buffer embark-consult consult-vertico consult compat compat-29 bookmark text-property-search pp embark ffap thingatpt marginalia vertico-multiform vertico orderless minibuf-eldef mb-depth block-undo visiting-buffer repeat recentf tree-widget wid-edit modus-operandi-theme modus-themes use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core finder-inf edmacro kmacro tex-site info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source eieio eieio-core eieio-loaddefs password-cache json map url-vars comp comp-cstr warnings subr-x rx cl-seq cl-macs cl-extra help-mode seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 702294 624224) (symbols 48 38966 5) (strings 32 166505 121826) (string-bytes 1 6784094) (vectors 16 68620) (vector-slots 8 1605969 120250) (floats 8 382 426) (intervals 56 1843 739) (buffers 992 20))