From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 10 12:36:08 2023 Received: (at submit) by debbugs.gnu.org; 10 Jan 2023 17:36:08 +0000 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 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 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 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 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) 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) From: =?utf-8?Q?Omar_Antol=C3=ADn_Camarena?= To: bug-gnu-emacs@gnu.org Subject: 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 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-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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)) From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 16 08:19:17 2023 Received: (at 60712) by debbugs.gnu.org; 16 Jul 2023 12:19:17 +0000 Received: from localhost ([127.0.0.1]:47001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qL0ia-0000p8-VS for submit@debbugs.gnu.org; Sun, 16 Jul 2023 08:19:17 -0400 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]:54581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qL0iX-0000oo-Ei for 60712@debbugs.gnu.org; Sun, 16 Jul 2023 08:19:15 -0400 Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3a43cbb4343so1283496b6e.1 for <60712@debbugs.gnu.org>; Sun, 16 Jul 2023 05:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689509947; x=1692101947; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=s7ss6U1BiZuZy96C9wclEFZla5Az5Bh6g7i62SJyU7M=; b=Hn4KHDtJb2ao/s8Wp5mvPc4sShQ74KTJAm6rl1nMoYd3DJcsSqlfSrzRQ3Gh5G1RRo w15BU66cGrh2DzgjB0UauUxyZCZrw+C+taTGw39P8JhJrC+Otn4vjdUPcNyeGafT8CUC e+L6xPQdzjkarBBB4p+EdhaB8Gu50wxAnoHE8MTu5Kf7tHiErwcoJ58lcnUyJRdYs3y+ gJsvbKvXR77EkZfQPhiAu1FL+NkBWddXPV2HQR8y8CXhDLmFF9AwysaPWPg2fOhybM5p m8Qh/RNGkl2J7OMqVWdL27CQeF1zuMaaY1UF5A7+RE5N6s/qAit4sn7DMm8qQvwEipHn +WRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689509947; x=1692101947; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=s7ss6U1BiZuZy96C9wclEFZla5Az5Bh6g7i62SJyU7M=; b=E3+aPMdLnJTtvdJmeTy/0LoXO5fDg6q9kG0BEwACt1vSx8qxfjNfnPf5UGnKlvH99M G6zjPNfx4qBdHj66h93SQwvNO8hjOx452onZp4ChaZIQekougHSe3/NEbzhjwIwTJnhR 3KQpwdqHWmd4VOmlRqTS95KzzhEjpYRGphlaHyvFyjQwAs59+k/u8lCvuTLSTsITtmPA MWaSyJqsVbqyolFEBmSPcUsRNPPAKzypBKPLoFBhFbVIXCpGkxbp+5LixnCd2CtpQKn6 7kiVaFOVRYjLSClW1Kk0BZTDNYkIdJbmC2+k2mAqsf9ynpb3F5sLGnTnb8g9ePRXQvdf M4BA== X-Gm-Message-State: ABy/qLZC4MxPeY4e8XnEmtJMIFGVLtM2+9bzAOb7yIGg16TIZVI4vWqP 7Ih+2vXcS6RhV8p1mdP5eI4= X-Google-Smtp-Source: APBJJlGCyqtzWWWSvgNQFOzujtqktYedzwbjQQ4xfLjEAMEpugkSFeJjcraqeTKVqMFfvj4adsSLoA== X-Received: by 2002:a54:4d93:0:b0:3a3:33e9:9a34 with SMTP id y19-20020a544d93000000b003a333e99a34mr7341901oix.55.1689509947406; Sun, 16 Jul 2023 05:19:07 -0700 (PDT) Received: from [192.168.0.234] ([186.127.128.249]) by smtp.gmail.com with ESMTPSA id m25-20020a9d7e99000000b006b89596bc61sm5597070otp.61.2023.07.16.05.19.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Jul 2023 05:19:06 -0700 (PDT) Message-ID: <8d7ea0a1-0847-3643-fa8e-7bfe1e066706@gmail.com> Date: Sun, 16 Jul 2023 09:18:54 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: =?UTF-8?Q?Omar_Antol=c3=adn_Camarena?= From: Mauro Aranda Subject: Re: bug#60712: 28.2; customize-set-variable won't let you change the type of a choice Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60712 Cc: 60712@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Omar Antolín Camarena writes: > 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 I didn't manage to reproduce it with this recipe.  What I had to do was, after emacs -Q: (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))) M-x customize-set-variable RET bool-or-alist I get a prompt: [boolean] [choice] Set customized value for bool-or-ailst to true: If I answer y or n, there's no problem, bool-or-alist will be t or nil. M-x customize-set-variable RET bool-or-alist New prompt: [alist] [choice] Set customized value for bool-or-alist to: Here if you answer t, you get the message: widget-prompt-value: Value does not match alist type Which is not surprising, since t is not an alist and the prompt says its expecting an alist. What's surprising is that the prompt is choosing one of the two options beforehand.  I mean, going back to the original definition and re-evaluating, say that I want to use customize-set-variable to change the alist.  I can't do that right away: I have to set it to t or nil, and then execute customize-set-variable again to set it to an alist. Not good. > 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))) > Yes, but it's not because of the tags.  It's just that previously the choice widget had two choice, and now it has three, and since there's at least two options to pick (excluding the current), widget-choice-prompt-value won't choose for you one of the options beforehand. We have this condition in widget-choice-prompt-value: ((and (= (length args) 2)       (memq old args))  (if (eq old (nth 0 args))      (nth 1 args)    (nth 0 args))) ARGS holds the choices available in the choice widget and OLD has the choice that matches the current value of the choice widget, before the user enters a new one.  This branch has been in the code since like forever, but I can't explain why it's good to have it. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 16 09:27:53 2023 Received: (at 60712) by debbugs.gnu.org; 16 Jul 2023 13:27:53 +0000 Received: from localhost ([127.0.0.1]:47065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qL1my-0002o9-OU for submit@debbugs.gnu.org; Sun, 16 Jul 2023 09:27:53 -0400 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]:62692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qL1mv-0002no-FZ for 60712@debbugs.gnu.org; Sun, 16 Jul 2023 09:27:50 -0400 Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-6b867acbf6dso2851252a34.0 for <60712@debbugs.gnu.org>; Sun, 16 Jul 2023 06:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689514063; x=1692106063; h=in-reply-to:references:cc:to:from:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=FGLCGIm7NvalouP37V4Y/5d0+Wh5dEIqje/3aoZJrrc=; b=D1+buyp4MoNQEQK4esePoqKTmGztnOSGF7G4VmvGLhhF+AX6THu6XdEj0iXFGHCSc7 875i+ZJGCYAfwco8njspgKQ3rHy5TA9k5UtOgjEFqYO1IZb/ghwI3jPMphea9AgCVhDP C+gTUKxImF1CKtBhxWajZpCJmWzdfJycFqyvIpZNACkg6lNL74DufGHONX4SqehIIMmg 6rN5Jo/xerWuPAODPnfpN1uSHejeuG+mpHYFwE31Twp10xu5/zGEoFhF65fTtGPdz62F KIMeEF8uYhFlD3pKELOPQu2gRl/q7auuU1zsCOWgiVKEobqlEHP0Wh0n0ZNU/3/4uoJ3 TEQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689514063; x=1692106063; h=in-reply-to:references:cc:to:from:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=FGLCGIm7NvalouP37V4Y/5d0+Wh5dEIqje/3aoZJrrc=; b=UtYaWGtr0xZrMwcTpWdrJDSqyrOJL33F212Mz9r5AVBoNKqgDJf+BfcjbDVB/MY1uq bPnPGVI1G0lIXZQd7zJKi1wGrESvvYAuDGUzr0zXcpYbxNshATKy2W1ouB3TxpSAuV4H d/HniJhoy1rT0k4L++zZau9Edgs5dJtah864t2nSve6O2tTr5xZAsPOv2Nc8DItQxKKL voZbjtWAqVUqMPPYP0xEsgnFEd6r67mZdxUkO39yYb9h6RwmgBkOrzUMoa+eJKKDVULY 7jZcrIoYi6Ss8EAjZXn913sb5KPXhtzcHac2oOCkLD8wsC9o8yMbOo3WQC4Ju5lq4mLQ LfAw== X-Gm-Message-State: ABy/qLb8DHvE98xFAGv7CWUfTsSkm6rZP4iE8kjfhKkVJvn5L6+j+kL1 njb4lv+DqawJ9/S1e3RWxr88m12ffLirPY4/ X-Google-Smtp-Source: APBJJlEwgODfnuvJ7A36sNnMEOXL+saCKcPyJsnfXRTZkiztTQ+EmSzfYLFn7s3clfD2HSTT6QqsmA== X-Received: by 2002:a05:6870:f625:b0:1b7:8957:bfe0 with SMTP id ek37-20020a056870f62500b001b78957bfe0mr4699798oab.20.1689514063350; Sun, 16 Jul 2023 06:27:43 -0700 (PDT) Received: from [192.168.0.234] ([186.127.128.249]) by smtp.gmail.com with ESMTPSA id zh27-20020a0568716b9b00b001a663e49523sm6091586oab.36.2023.07.16.06.27.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Jul 2023 06:27:42 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------xNW0CSm05ibMk0btXVoglvDO" Message-ID: <7daa5402-fb93-c6ba-dbd0-829eb1c4caa4@gmail.com> Date: Sun, 16 Jul 2023 10:27:39 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#60712: 28.2; customize-set-variable won't let you change the type of a choice Content-Language: en-US From: Mauro Aranda To: 60712@debbugs.gnu.org References: <8d7ea0a1-0847-3643-fa8e-7bfe1e066706@gmail.com> In-Reply-To: <8d7ea0a1-0847-3643-fa8e-7bfe1e066706@gmail.com> X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 60712 Cc: =?UTF-8?Q?Omar_Antol=c3=adn_Camarena?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) This is a multi-part message in MIME format. --------------xNW0CSm05ibMk0btXVoglvDO Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Mauro Aranda writes: > We have this condition in widget-choice-prompt-value: > ((and (= (length args) 2) >       (memq old args)) >  (if (eq old (nth 0 args)) >      (nth 1 args) >    (nth 0 args))) > > ARGS holds the choices available in the choice widget and OLD has > the choice that matches the current value of the choice widget, before > the user enters a new one.  This branch has been in the code since like > forever, but I can't explain why it's good to have it. So, we should respect the value of widget-choice-toggle also when prompting, of course.  I attach a patch to fix it. --------------xNW0CSm05ibMk0btXVoglvDO Content-Type: text/x-patch; charset=UTF-8; name="0001-Don-t-always-toggle-a-choice-when-prompting.patch" Content-Disposition: attachment; filename="0001-Don-t-always-toggle-a-choice-when-prompting.patch" Content-Transfer-Encoding: base64 RnJvbSAxYzk2YzU2ZDYyZDk1MzVkNTBmYWI2NmJiN2I5MTdiZDU2ZTgyM2EzIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBNYXVybyBBcmFuZGEgPG1hdXJvb2FyYW5kYUBnbWFp bC5jb20+CkRhdGU6IFN1biwgMTYgSnVsIDIwMjMgMDk6MjI6MTEgLTAzMDAKU3ViamVjdDog W1BBVENIXSBEb24ndCBhbHdheXMgdG9nZ2xlIGEgY2hvaWNlIHdoZW4gcHJvbXB0aW5nCgoq IGxpc3Avd2lkLWVkaXQuZWwgKHdpZGdldC1jaG9pY2UtcHJvbXB0LXZhbHVlKTogUmVzcGVj dCB0aGUgdmFsdWUKb2Ygd2lkZ2V0LWNob2ljZS10b2dnbGUuICAoQnVnIzYwNzEyKQotLS0K IGxpc3Avd2lkLWVkaXQuZWwgfCAzICsrLQogMSBmaWxlIGNoYW5nZWQsIDIgaW5zZXJ0aW9u cygrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL2xpc3Avd2lkLWVkaXQuZWwgYi9s aXNwL3dpZC1lZGl0LmVsCmluZGV4IDIzNGYzZDliNzRkLi45NmRmZjY5ZTJkZiAxMDA2NDQK LS0tIGEvbGlzcC93aWQtZWRpdC5lbAorKysgYi9saXNwL3dpZC1lZGl0LmVsCkBAIC0zOTg1 LDcgKzM5ODUsOCBAQCB3aWRnZXQtY2hvaWNlLXByb21wdC12YWx1ZQogCQkgbmlsKQogCQko KD0gKGxlbmd0aCBhcmdzKSAxKQogCQkgKG50aCAwIGFyZ3MpKQotCQkoKGFuZCAoPSAobGVu Z3RoIGFyZ3MpIDIpCisgICAgICAgICAgICAgICAgKChhbmQgd2lkZ2V0LWNob2ljZS10b2dn bGUKKyAgICAgICAgICAgICAgICAgICAgICAoPSAobGVuZ3RoIGFyZ3MpIDIpCiAJCSAgICAg IChtZW1xIG9sZCBhcmdzKSkKIAkJIChpZiAoZXEgb2xkIChudGggMCBhcmdzKSkKIAkJICAg ICAobnRoIDEgYXJncykKLS0gCjIuMzQuMQoK --------------xNW0CSm05ibMk0btXVoglvDO-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 22 08:58:55 2023 Received: (at 60712-done) by debbugs.gnu.org; 22 Jul 2023 12:58:55 +0000 Received: from localhost ([127.0.0.1]:35623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNCCE-0005om-R8 for submit@debbugs.gnu.org; Sat, 22 Jul 2023 08:58:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNCCE-0005oa-0H for 60712-done@debbugs.gnu.org; Sat, 22 Jul 2023 08:58:54 -0400 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 1qNCC8-00054y-Pd; Sat, 22 Jul 2023 08:58:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=UkK2IkTXsIczip1au55JRsiU4Kb1yIdHETP+SQe8Gxo=; b=GO4kpto23Z20cDWam5Pe rODQqYa6ax7ibqZQThrF4ZfpIHjh5NZoqlr8W3bR2iDqiGchH146MyFjWREUWivOqQhry5ugOFGE7 McoRHBI5LdZzSTnM9++fCExWGC8b0wErpI3kStKoXfTsn4eVrX796LBpgb/7nWc0R+A+8nN2O+bqW oaS+1J5NolCb+6hpIbGTJucTY+VqoavjHfUrL2MbjOANrRODGn8jKd/Tc1pIMeCyOO7Wgc1DkRH8i LoyeyJg1mtj4M4SNTYhy8f54OM+1i/R9sR1pw3XmDUVo516vPJPOxHyAc9AQXSNDeKHCJrF2cHXVx EgJSwMCaIgQoUQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNCBw-00070j-Rx; Sat, 22 Jul 2023 08:58:39 -0400 Date: Sat, 22 Jul 2023 15:59:15 +0300 Message-Id: <83jzus85lo.fsf@gnu.org> From: Eli Zaretskii To: Mauro Aranda In-Reply-To: <7daa5402-fb93-c6ba-dbd0-829eb1c4caa4@gmail.com> (message from Mauro Aranda on Sun, 16 Jul 2023 10:27:39 -0300) Subject: Re: bug#60712: 28.2; customize-set-variable won't let you change the type of a choice References: <8d7ea0a1-0847-3643-fa8e-7bfe1e066706@gmail.com> <7daa5402-fb93-c6ba-dbd0-829eb1c4caa4@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60712-done Cc: omar.antolin@gmail.com, 60712-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: Omar Antolín Camarena > Date: Sun, 16 Jul 2023 10:27:39 -0300 > From: Mauro Aranda > > Mauro Aranda writes: > > > We have this condition in widget-choice-prompt-value: > > ((and (= (length args) 2) > >       (memq old args)) > >  (if (eq old (nth 0 args)) > >      (nth 1 args) > >    (nth 0 args))) > > > > ARGS holds the choices available in the choice widget and OLD has > > the choice that matches the current value of the choice widget, before > > the user enters a new one.  This branch has been in the code since like > > forever, but I can't explain why it's good to have it. > > So, we should respect the value of widget-choice-toggle also when > prompting, of course.  I attach a patch to fix it. Thanks, installed on the master branch, and closing the bug. From unknown Wed Jun 18 23:17:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 20 Aug 2023 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator