From unknown Mon Jun 16 23:36:44 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#44579 <44579@debbugs.gnu.org> To: bug#44579 <44579@debbugs.gnu.org> Subject: Status: Unintended behaviour with =?UTF-8?Q?defcustom=E2=80=99s_?= =?UTF-8?Q?=E2=80=98choice=E2=80=99?= widgets and ":inline t" & Wrong documentation on "(elisp) Splicing into Lists" Reply-To: bug#44579 <44579@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:36:44 +0000 retitle 44579 Unintended behaviour with defcustom=E2=80=99s =E2=80=98choice= =E2=80=99 widgets and ":inline t" & Wrong documentation on "(elisp) Splicin= g into Lists" reassign 44579 emacs submitter 44579 Leo Vivier severity 44579 normal tag 44579 patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 11 10:30:34 2020 Received: (at submit) by debbugs.gnu.org; 11 Nov 2020 15:30:34 +0000 Received: from localhost ([127.0.0.1]:42604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcs4v-00012q-41 for submit@debbugs.gnu.org; Wed, 11 Nov 2020 10:30:33 -0500 Received: from lists.gnu.org ([209.51.188.17]:57146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcs3d-0000zB-PL for submit@debbugs.gnu.org; Wed, 11 Nov 2020 10:29:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcs3d-0003NW-2B for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2020 10:29:13 -0500 Received: from aibo.runbox.com ([91.220.196.211]:58812) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kcs3Z-0007Eu-HL for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2020 10:29:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zaeph.net; s=selector2; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=r36Q48L4evo/akdZSO0TbgcgjuS8yHRY1lGAYsfx2nE=; b=KiWdw3XHKobUObFmqeQRglZQS kD0ePerrdBc1weOoT0wJzAiat92NyfI2p2KfKQ9aXUP73XKyqy3Z0TbG0zYSVRvTbPgEcOt1hfaPO bzlCWvnduyh3+oUeNXEYeRZepWDb9kmKwniUkGn1OcJgyKb2aUFSO4DpklC+90MyeNh6Sbeu+nabH eeEcJWb4OyRG2VpSoWpr1Mmtf4H40HjDvP5c3ZBfs7+R4qoakLWYeQ9Y5dOQy7xvDC4Tj6+k8g8YU uwFQN+6X456LHptl6+5FyZ5PtBLjxGq6ekDac/3xryS32WVLXUbtXjh48FH1eJK/BZ2ABP2cL9b/Z ea0Oh7TJA==; Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1kcs3V-0005db-07 for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2020 16:29:05 +0100 Received: by submission02.runbox with esmtpsa [Authenticated alias (984850)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1kcs3D-0003iN-5o for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2020 16:28:47 +0100 From: Leo Vivier To: bug-gnu-emacs@gnu.org Subject: Unintended behaviour with =?utf-8?Q?defcustom=E2=80=99s_=E2=80=98?= =?utf-8?Q?choice=E2=80=99?= widgets and ":inline t" & Wrong documentation on "(elisp) Splicing into Lists" Date: Wed, 11 Nov 2020 16:28:46 +0100 Message-ID: <87lff7yksx.fsf@hidden> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=91.220.196.211; envelope-from=zaeph@zaeph.net; helo=aibo.runbox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/11 10:29:05 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 11 Nov 2020 10:30:30 -0500 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.4 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi there, There seems to be a problem in `defcustom' forms with the way the `choice' widget handles `:inline t'. I=E2=80=99ve written an .el file to walk you through it: I=E2=80=99ve docum= ented the bug, the explanation, and a tentative solution. I recommended downloading the attachment and eval=E2=80=99ing the forms as = they appear. Make sure that you use C-M-x with the `defcustom' forms, lest their STANDARD not be reset. HTH, --=20 Leo Vivier Freelance Software Engineer Website: www.leovivier.com | Blog: www.zaeph.net --=-=-= Content-Type: text/emacs-lisp; charset=utf-8 Content-Disposition: inline; filename=defcustom-inline-debug.el Content-Transfer-Encoding: quoted-printable ;;; DESCRIPTION ;; Incriminated section of the manual: (info "(elisp) Splicing into Lists") ;; > When the element-type is a =E2=80=98choice=E2=80=99, you use =E2=80= =98:inline=E2=80=99 not in the ;; > =E2=80=98choice=E2=80=99 itself, but in (some of) the alternatives of = the =E2=80=98choice=E2=80=99. For ;; > example, to match a list which must start with a file name, followed ;; > either by the symbol =E2=80=98t=E2=80=99 or two strings, use this cust= omization type: ;; > ;; > (list file ;; > (choice (const t) ;; > (list :inline t string string))) ;; > ;; > If the user chooses the first alternative in the choice, then the ;; > overall list has two elements and the second element is =E2=80=98t=E2= =80=99. If the ;; > user chooses the second alternative, then the overall list has three ;; > elements and the second and third must be strings. ;; The first option in =E2=80=98choice=E2=80=99 works. (defcustom zp/testing '("foo" t) "Testing variable." :type '(list file (choice (const t) (list :inline t string string)))) (customize-variable 'zp/testing) ;; =3D> The form is recognised. ;; The second option in =E2=80=98choice=E2=80=99 doesn=E2=80=99t work. (defcustom zp/testing '("foo" "bar" "baz") "Testing variable." :type '(list file (choice (const t) (list :inline t string string)))) (customize-variable 'zp/testing) ;; =3D> The form is *not* recognised. ;; Proof that =E2=80=98choice=E2=80=99 implies a list in this context by en= closing the result ;; of the =E2=80=98choice=E2=80=99 in a list in STANDARD. (defcustom zp/testing '("foo" ("bar" "baz")) ; <--- "Testing variable." :type '(list file (choice (const t) (list :inline t string string)))) (customize-variable 'zp/testing) ;; =3D> The form is recognised. ;;; DEBUGGING ;; Adding another ":inline t" for `choice' allows us to make progress. (defcustom zp/testing '("foo" "bar" "baz") "Testing variable." :type '(list file (choice :inline t ; <--- (const t) (list :inline t string string)))) (customize-variable 'zp/testing) ;; =3D> The form is recognised. ;; =E2=80=A6But this makes the first option not recognised t as a legitimat= e value. (defcustom zp/testing '("foo" t) "Testing variable." :type '(list file (choice :inline t ; <--- (const t) (list :inline t string string)))) (customize-variable 'zp/testing) ;; =3D> The form is recognised, but t is not recognised as a valid value. ;; However, manually selecting t in the "Value menu" produces a form which = you ;; can apply, producing exactly the same form as STANDARD. Closing and ;; reopening the customise window after applying the value produces the same ;; invalid value, as expected. ;; Enclosing t in a list resolves the issue. (defcustom zp/testing '("foo" "bar" "baz") "Testing variable." :type '(list file (choice :inline t (list :inline t ; <--- (const t)) (list :inline t string string)))) (customize-variable 'zp/testing) ;; =3D> The form is recognised, but at what cost? ;; Also, it is slightly misleading to present the first choice as a "List" = in ;; the menu, considering that the list is exploded into its single element. ;; =E2=80=A6Let=E2=80=99s dive deeper, shall we? ;;; EXPLANATION (for the courageous) ;; The issue can be more easily grokked if we consider a close alternative = to ;; the =E2=80=98choice=E2=80=99 widget: =E2=80=98set=E2=80=99. Instead of = the XOR presented in the previous ;; choices, we=E2=80=99re going to turn it into an OR and enclose it into a= list. (defcustom zp/testing '("foo" (t "bar" "baz")) ; <--- "Testing variable." :type '(list file (set ;No ":inline t" to keep the the list as= is (const t) (list :inline t string string)))) (customize-variable 'zp/testing) ;; =3D> The form is recognised. ;; As we can see, the =E2=80=98set=E2=80=99 widget always implies a list, w= hich is why all the ;; options are enclosed in a list. ;; Now, let=E2=80=99s explode that list by adding ":inline t" to the =E2=80= =98set=E2=80=99 widget: (defcustom zp/testing '("foo" t "bar" "baz") ; <--- "Testing variable." :type '(list file (set :inline t ; <--- (const t) (list :inline t string string)))) (customize-variable 'zp/testing) ;; =3D> The form is recognised. ;; If we focus on the second option in =E2=80=98set=E2=80=99, we can see th= at =E2=80=98set=E2=80=99 receives ;; the constant t alongside two strings which are the elements of an explod= ed ;; list. Therefore, =E2=80=98set=E2=80=99 is handed three elements which i= t packages into ;; a list. This list is then exploded via ":inline t". ;; (Please note that my usage of "handed over" is used to describe what is ;; *seemingly* happening, which is not how the code actually implements it,= as ;; we=E2=80=99ll see later.) ;; ;; The difference between the =E2=80=98set=E2=80=99 widget and the =E2=80= =98choice=E2=80=99 widget is that the ;; later does not always imply a list. ;; ;; Let=E2=80=99s return to the previous non-functioning examples with =E2= =80=98choice=E2=80=99 and ;; ":inline t". ;; Scenario 1: 2nd option for =E2=80=98choice=E2=80=99 (defcustom zp/testing '("foo" "bar" "baz") ; <--- "Testing variable." :type '(list file (choice :inline t (const t) (list :inline t ; <--- MATCH string string)))) (customize-variable 'zp/testing) ;; =3D> The form is recognised. ;; Here, we have a very similar scenario to the one which was just described ;; with =E2=80=98set=E2=80=99: =E2=80=98choice=E2=80=99 is handed an explod= ed list which it packages into ;; a list. This list is then exploded via ":inline t". ;; Scenario 2: 1st option for =E2=80=98choice=E2=80=99 *without* a wrapping= list (defcustom zp/testing '("foo" t) "Testing variable." :type '(list file (choice :inline t (const t) ; <--- MATCH? (list :inline t string string)))) (customize-variable 'zp/testing) ;; =3D> The form is recognised, but t is not recognised as a valid value. ;; In this scenario, =E2=80=98choice=E2=80=99 receives a single element, t,= and is instructed ;; to explode it via ":inline t". This results in an existential panic ;; (=C2=AB Sacrebleu, ceci n=E2=80=99est pas une liste ?! =C2=BB) which ult= imately causes ;; =E2=80=98customize=E2=80=99 to not parse the form properly. ;; Scenario 3: 1st option for =E2=80=98choice=E2=80=99 *with* a wrapping li= st (defcustom zp/testing '("foo" t) "Testing variable." :type '(list file (choice :inline t (list :inline t ;Wrapping list (const t)) ; <--- MATCH (list :inline t string string)))) (customize-variable 'zp/testing) ;; =3D> The form is recognised, but at what cost? ;; If we pause here for a moment, this is the reason why we need to revise = the ;; "handed over" model I described above. If =E2=80=98choice=E2=80=99 and = =E2=80=98set=E2=80=99 exploded ;; their elements in the order I detailed, elements shouldn=E2=80=99t be di= scriminated ;; upon their provenance, i.e., whether they were atomic elements or if they ;; came from an exploded list. ;; Let=E2=80=99s essentialise the form a little bit to clarify my point: ;; (All the examples below produce well-formed results for =E2=80=98customi= ze=E2=80=99.) (defcustom zp/testing t ;Atomic element "Testing variable." :type '(choice (list :inline t (const t)) (const t))) ; <--- MATCH (customize-variable 'zp/testing) ;; Based on the order of the options, if the 1st option had been exploded ;; before considering STANDARD, it should have matched. Instead, it=E2=80= =99s the 2nd ;; option which matches. (defcustom zp/testing '(t) ;List with an atomic element "Testing variable." :type '(choice (list :inline t ; <--- MATCH (const t)) (const t))) (customize-variable 'zp/testing) ;; When STANDARD is a list, the 1st option matches in spite of the exploded ;; list, which goes against what is described in the manual. ;; My interpretation is that =E2=80=98choice=E2=80=99 was not designed with= ":inline t" in ;; mind, or at least not as =E2=80=98set=E2=80=99 was. I haven=E2=80=99t i= nvestigated how the parsing ;; is done internally, but I assume that =E2=80=98choice=E2=80=99 fails to = understand ":inline ;; t" in composite widgets. ;; Just to be clear, ":inline t" implies that we want the elements in the ;; composite widget to be merged inside the super-element, i.e., the one wh= ich ;; *includes* the composite widget with ":inline t". ;; Let=E2=80=99s refer back to the examples with =E2=80=98set=E2=80=99 to i= llustrate this: (defcustom zp/testing '("foo" (t "bar" "baz")) ; <--- "Testing variable." :type '(list file (set ;No ":inline t" to keep the the list as is (const t) (list :inline t string string)))) (customize-variable 'zp/testing) ;; =3D> The form is recognised. (defcustom zp/testing '("foo" t "bar" "baz") ; <--- "Testing variable." :type '(list file (set :inline t ;Now with ":inline t" (const t) (list :inline t string string)))) (customize-variable 'zp/testing) ;; =3D> The form is recognised. ;; Now, the fundamental problem with =E2=80=98choice=E2=80=99---and mind th= e quotes, this ;; isn=E2=80=99t Philosophy 101---is that it is a composite widget which mu= st ;; *sometimes* return non-composite widgets: ;; ;; 1. (choice symbol symbol) ;; always returns a non-composite widget ;; ;; 2. (choice (list symbol) (list symbol)) ;; always returns a composite widget ;; ;; 3. (choice (list symbol) symbol) ;; *sometimes* returns a non-composite widget ;; *sometimes* returns a composite widget ;; ;; Because of this, the current implementation of =E2=80=98choice=E2=80=99 = always tries to ;; return a single well-formed widget. When we use ":inline t" on a compos= ite ;; widget, we explicity tell that widget that we don=E2=80=99t care about i= ts opinion ;; and we explode it. If it only had one element, Mazel-fucking-tov, we=E2= =80=99ve ;; got a well-formed non-composite widget! But if it had more than one ;; element, all we=E2=80=99re left with is a a group of elements which aren= =E2=80=99t in ;; a list, but which would have to be coerced into one for =E2=80=98choice= =E2=80=99 to ;; consider them as a well-formed option. ;; ;; So, since all widgets are created equals, rather than discriminating upon ;; well-formedness---society abhors originals, after all---we coerce this ;; rebelious group into a list to set the world aright. ;; ;; But there is a way, and I=E2=80=99ll explain it in the next section. ;;; SUGGESTED FIX ;; =E2=80=98choice=E2=80=99 needs to be made aware of the ":inline t" in it= s options. ;; ;; Since =E2=80=98choice=E2=80=99 is intended to receed into the background= once the ;; appropriate option has been pattern-matched, it doesn=E2=80=99t make sen= se to have ;; it carry the ":inline t". Instead, it should respect the ":inline t" th= at ;; is present in its option when said option is matched. ;; Let=E2=80=99s walk through an example to clarify: (defcustom zp/testing t ;Atomic element "Testing variable." :type '(choice (list :inline t ;Option 1 (const t)) (const t))) ;Option 2 (customize-variable 'zp/testing) ;; (For those of you following at home, this was the first essentialised ;; example. If you didn=E2=80=99t read the previous section and you=E2=80= =99re feeling left ;; out, that=E2=80=99s what you get for skipping my lecture, you ingrate.) ;; With the *current implementation*, Option 2 is matched. Option 1 is ;; exploded as instructed, but =E2=80=98choice=E2=80=99 coerces it into a l= ist in order to ;; return it as a well-formed widget. ;; ;; Instead, when =E2=80=98choice=E2=80=99 pattern-matches an option which h= as ":inline t" in ;; it (notwithstanding those which might be nested if the option happens to= be ;; a composite widget), it should *distribute* that ":inline t" to the ;; =E2=80=98choice=E2=80=99 widget itself so as to return the rebellious gr= oup of elements ;; (that=E2=80=99s another reference you might have missed from the previou= s section; ;; sucks to be you, eh?). ;; ;; So, in short: when =E2=80=98choice=E2=80=99 has an option with ":inline = t", explode the ;; option for pattern-matching, and if it matches, distribute the ":inline = t" ;; to the =E2=80=98choice=E2=80=99 widget. ;; ;; *** ;; ;; Now, I know what you=E2=80=99re thinking: why spend so long documenting = a problem ;; rather than *actually* trying to fix it? Well, firstly, congratulations, ;; you=E2=80=99ve described academia, but I also happen to be an English ma= jor, and ;; I=E2=80=99ll jump on every occasion I get to offset my technical-illiter= ateness ;; with my actual-literateness. Secondly I couldn=E2=80=99t believe the doc= of Emacs ;; to be any less than perfect: claiming otherwise would have been hubris, = and ;; I had no idea what pandemonium awaited me if I dared to refactor the ;; scriptures. ;; ;; Thank you for listening to my TED Talk.^A^K ;; Remember that the real treasure is the friends we made along the way.^A^K ;; ;; =E2=80=A6Thank you. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 16 18:49:16 2020 Received: (at 44579) by debbugs.gnu.org; 16 Nov 2020 23:49:16 +0000 Received: from localhost ([127.0.0.1]:57772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keoFH-0005qt-8Q for submit@debbugs.gnu.org; Mon, 16 Nov 2020 18:49:16 -0500 Received: from mail-wm1-f54.google.com ([209.85.128.54]:37333) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keoFE-0005qa-Ui for 44579@debbugs.gnu.org; Mon, 16 Nov 2020 18:49:14 -0500 Received: by mail-wm1-f54.google.com with SMTP id h21so1176310wmb.2 for <44579@debbugs.gnu.org>; Mon, 16 Nov 2020 15:49:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=Ivluq/k5i29Ad1M0sk+j+XJKN3m0CbJdHJ514mc5AOY=; b=krqsVHrIyOPv9l8rrNOxAA6JMm3tiehi4L9b/xk3tCcagT3HeizV8l/jcQHQG3oLwd BThafvoRY7jcg2OXqsoFiAaZkzgaPGl5Oh0jH8roXm/4uDaHjsTTfbDkngUmPBoHmokD Fxfx5UWiilg1ZeH117JNdHuRcaRIiN+xdt6cbABo9Efwr13TKE9k3lEubDoiQC+DA1oS E77ChgOT8DSBF/Rv0QzFQS27DhibhbrOvFye5ufJcH6GginOaezY0H/9Ft0jLc3Cmn4C 4duQ9On10JVmoAv8+zl2PQKjk9SD35pXpK8hYNXwyTLHUGsvU2zohyc45Kt/tHXkqht8 eq5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=Ivluq/k5i29Ad1M0sk+j+XJKN3m0CbJdHJ514mc5AOY=; b=DOWQhTKAA0QZvmZKaShhajpfb4Gn/La5h1rbCLFZb0vKWAsSfSe9nNAKdy7WLTcUJ+ QtLTSWasQej0TyGlsPLb33N3W7s7QEw04wZxIsT8lzYLyLrqfdhY5J8Q39L+GRzlI2WA GOQgLaGSKKdncUMin5qgDs/DSCedBxbe/me6PEPj1TgzmmG7c2PnAOFbHN7xrqFof3b0 CUkYMIAAlAmLq7VApDY8VVs3EaRq4PBXQF0uw71psQwx1v1pXeYgsU0F+YsqobCIjDxO +Ql6IXuv1nsuVcOTy5yYDEBAwVZTF5hfr3ABFxMzgdQ/zzGPu6Ja882ucii5Zm5stQ/5 3Pdg== X-Gm-Message-State: AOAM533PaOukFMx8LQS4JWmxwwK+2Aqd2kZDEXM7WWWqS6waRrFegCt/ b6rN/7WpCMIGWvLFDaznlZjJQ+EJ6JGtMwl7wuo= X-Google-Smtp-Source: ABdhPJyp1/UPCJH9tGhomIQpSjPncbLcRjkXVVcRiwvIuADUsb+U91NmWZxQuvSR6W2kNA1mASOKjq6K7bDRtTemob4= X-Received: by 2002:a1c:20c6:: with SMTP id g189mr1352700wmg.6.1605570547019; Mon, 16 Nov 2020 15:49:07 -0800 (PST) MIME-Version: 1.0 From: Mauro Aranda Date: Mon, 16 Nov 2020 20:48:54 -0300 Message-ID: Subject: =?UTF-8?Q?Re=3A_bug=2344579=3A_Unintended_behaviour_with_defcustom?= =?UTF-8?Q?=E2=80=99s_=E2=80=98choice=E2=80=99_widgets_and_=22=3Ainline_t=22_=26_Wrong_documentat?= =?UTF-8?Q?ion_on_=22=28elisp=29_Splicing_into_Lists=22?= To: Leo Vivier Content-Type: multipart/mixed; boundary="0000000000001e155f05b442068d" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44579 Cc: 44579@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 (-) --0000000000001e155f05b442068d Content-Type: multipart/alternative; boundary="0000000000001e155d05b442068b" --0000000000001e155d05b442068b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable tags 44579 patch quit Leo Vivier writes: > Hi there, > > There seems to be a problem in `defcustom' forms with the way the > `choice' widget handles `:inline t'. > > I=E2=80=99ve written an .el file to walk you through it: I=E2=80=99ve doc= umented the > bug, the explanation, and a tentative solution. > [...] > ;; > When the element-type is a =E2=80=98choice=E2=80=99, you use =E2= =80=98:inline=E2=80=99 not in the > ;; > =E2=80=98choice=E2=80=99 itself, but in (some of) the alternatives o= f the =E2=80=98choice=E2=80=99. For > ;; > example, to match a list which must start with a file name, followed > ;; > either by the symbol =E2=80=98t=E2=80=99 or two strings, use this cu= stomization type: > ;; > > ;; > (list file > ;; > (choice (const t) > ;; > (list :inline t string string))) > ;; > > ;; > If the user chooses the first alternative in the choice, then the > ;; > overall list has two elements and the second element is =E2=80=98t= =E2=80=99. If the > ;; > user chooses the second alternative, then the overall list has three > ;; > elements and the second and third must be strings. > > ;; The first option in =E2=80=98choice=E2=80=99 works. > (defcustom zp/testing '("foo" t) > "Testing variable." > :type > '(list file > (choice (const t) > (list :inline t > string > string)))) > > (customize-variable 'zp/testing) > ;; =3D> The form is recognised. > > ;; The second option in =E2=80=98choice=E2=80=99 doesn=E2=80=99t work. > (defcustom zp/testing '("foo" "bar" "baz") > "Testing variable." > :type > '(list file > (choice (const t) > (list :inline t > string > string)))) > > (customize-variable 'zp/testing) > ;; =3D> The form is *not* recognised. Confirmed. > ;;; SUGGESTED FIX > > ;; =E2=80=98choice=E2=80=99 needs to be made aware of the ":inline t" in = its options. > ;; > ;; Since =E2=80=98choice=E2=80=99 is intended to receed into the backgrou= nd once the > ;; appropriate option has been pattern-matched, it doesn=E2=80=99t make s= ense to have > ;; it carry the ":inline t". Instead, it should respect the ":inline t" that > ;; is present in its option when said option is matched. Yes, something like that. This bug happens because the choice widget is unable to tell to widget-match-inline that it wants to try to match more than one member of a list, when one of its choices is inline. So widget-match-inline only passes it one element, in this case a string, and one string won't match a list of two strings. So the choice widget needs to be able to tell widget-match-inline about that. To avoid a large impact of tweaking the code to fix this, I made a change to affect only choice widgets with inline choices, which are the ones that suffer exhibit this bug. The patch to wid-edit.el is a little larger, because once the choice widget can match inline values, then it has to be able to create them. I added tests for both matching choice widgets and creating the choice widgets as a part of other grouping widgets. In current master, the following tests should fail, exposing the bug: widget-test-choice-match-all-inline widget-test-choice-match-some-inline And without the changes to the create functions, the following tests would fail: widget-test-repeat-can-handle-inlinable-choice widget-test-list-can-handle-inlinable-choice widget-test-option-can-handle-inlinable-choice --0000000000001e155d05b442068b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
tags 44579 patch
quit


> Hi there,
>
> There seems to be a = problem in `defcustom' forms with the way the
> `choice' widg= et handles `:inline t'.
>
> I=E2=80=99ve written an .el fil= e to walk you through it: I=E2=80=99ve documented the
> bug, the expl= anation, and a tentative solution.
>

[...]

> ;; >= =C2=A0 =C2=A0When the element-type is a =E2=80=98choice=E2=80=99, you use = =E2=80=98:inline=E2=80=99 not in the
> ;; > =E2=80=98choice=E2=80= =99 itself, but in (some of) the alternatives of the =E2=80=98choice=E2=80= =99.=C2=A0 For
> ;; > example, to match a list which must start wi= th a file name, followed
> ;; > either by the symbol =E2=80=98t=E2= =80=99 or two strings, use this customization type:
> ;; >
>= ;; > =C2=A0 =C2=A0 =C2=A0(list file
> ;; > =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(choice (const t)
> ;; > =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(list :inline t string = string)))
> ;; >
> ;; > If the user chooses the first alt= ernative in the choice, then the
> ;; > overall list has two eleme= nts and the second element is =E2=80=98t=E2=80=99.=C2=A0 If the
> ;; = > user chooses the second alternative, then the overall list has three> ;; > elements and the second and third must be strings.
> <= br>> ;; The first option in =E2=80=98choice=E2=80=99 works.
> (def= custom zp/testing '("foo" t)
> =C2=A0 "Testing var= iable."
> =C2=A0 :type
> =C2=A0 '(list file
> = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(choice (const t)
> =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(list :inline t
> =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0string> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= string))))
>
> (customize-variable 'zp/testing)
> ;;= =3D> The form is recognised.
>
> ;; The second option in = =E2=80=98choice=E2=80=99 doesn=E2=80=99t work.
> (defcustom zp/testin= g '("foo" "bar" "baz")
> =C2=A0 &qu= ot;Testing variable."
> =C2=A0 :type
> =C2=A0 '(list f= ile
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(choice (const t)
> =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(list :inline t<= br>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0string
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0string))))
>
> (customize-variable 'zp/testin= g)
> ;; =3D> The form is *not* recognised.

Confirmed.
> ;;; SUGGESTED FIX
>
> ;; =E2=80=98choice=E2=80=99 needs= to be made aware of the ":inline t" in its options.
> ;;> ;; Since =E2=80=98choice=E2=80=99 is intended to receed into the bac= kground once the
> ;; appropriate option has been pattern-matched, it= doesn=E2=80=99t make sense to have
> ;; it carry the ":inline t= ".=C2=A0 Instead, it should respect the ":inline t" that
= > ;; is present in its option when said option is matched.

Yes, s= omething like that.=C2=A0 This bug happens because the choice widget is
= unable to tell to widget-match-inline that it wants to try to match morethan one member of a list, when one of its choices is inline.=C2=A0 So
= widget-match-inline only passes it one element, in this case a string,
a= nd one string won't match a list of two strings.

So the choice w= idget needs to be able to tell widget-match-inline about
that.=C2=A0 To = avoid a large impact of tweaking the code to fix this, I made
a change t= o affect only choice widgets with inline choices, which are
the ones tha= t suffer exhibit this bug.

The patch to wid-edit.el is a little larg= er, because once the choice
widget can match inline values, then it has = to be able to create them.

I added tests for both matching choice wi= dgets and creating the choice
widgets as a part of other grouping widget= s.=C2=A0 In current master, the
following tests should fail, exposing th= e bug:
widget-test-choice-match-all-inline
widget-test-choice-match-s= ome-inline

And without the changes to the create functions, the foll= owing tests
would fail:
widget-test-repeat-can-handle-inlinable-choic= e
widget-test-list-can-handle-inlinable-choice
widget-test-option-can= -handle-inlinable-choice
--0000000000001e155d05b442068b-- --0000000000001e155f05b442068d Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Fix-matching-of-inline-choices-for-the-choice-widget.patch" Content-Disposition: attachment; filename="0001-Fix-matching-of-inline-choices-for-the-choice-widget.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_khl73o1m0 RnJvbSBhZmNlOGRiOWU0MmFiMjBiZjBlMjdmYjA4N2I5YzE3YTQxYWViNzBhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXVybyBBcmFuZGEgPG1hdXJvb2FyYW5kYUBnbWFpbC5jb20+ CkRhdGU6IE1vbiwgMTYgTm92IDIwMjAgMjA6MDU6MDQgLTAzMDAKU3ViamVjdDogW1BBVENIXSBG aXggbWF0Y2hpbmcgb2YgaW5saW5lIGNob2ljZXMgZm9yIHRoZSBjaG9pY2Ugd2lkZ2V0CgpBIGNo b2ljZSB3aWRnZXQgc2hvdWxkIGJlIGFibGUgdG8gbWF0Y2ggZWl0aGVyIG5vIGlubGluZSB2YWx1 ZXMgb3IKaW5saW5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Y2hvaWNlIChjb25zdCBuaWwpIChjb25z dCB0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsaXN0IDpp bmxpbmUgdCBzeW1ib2wgbnVtYmVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAnKGNob2ljZSAoY29uc3QgbmlsKSAoY29uc3QgdCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAobGlzdCBmdW5jdGlvbiBzdHJpbmcpKSkpCisgICAgICAgICAg IChjaGlsZHJlbiAod2lkZ2V0LWdldCB3aWRnZXQgOmNoaWxkcmVuKSkKKyAgICAgICAgICAgKGNo aWxkLTEgKGNhciBjaGlsZHJlbikpCisgICAgICAgICAgIChjaGlsZC0yIChjYWRyIGNoaWxkcmVu KSkpCisgICAgICAoc2hvdWxkLW5vdCAod2lkZ2V0LWlubGluZS1wIHdpZGdldCkpCisgICAgICAo c2hvdWxkLW5vdCAod2lkZ2V0LWlubGluZS1wIGNoaWxkLTEpKQorICAgICAgKHNob3VsZCAod2lk Z2V0LWlubGluZS1wIGNoaWxkLTEgJ2J1YmJsZSkpCisgICAgICAoc2hvdWxkLW5vdCAod2lkZ2V0 LWlubGluZS1wIGNoaWxkLTIpKQorICAgICAgKHNob3VsZC1ub3QgKHdpZGdldC1pbmxpbmUtcCBj aGlsZC0yICdidWJibGUpKSkpKQorCisoZXJ0LWRlZnRlc3Qgd2lkZ2V0LXRlc3QtcmVwZWF0LWNh bi1oYW5kbGUtY2hvaWNlICgpCisgICJUZXN0IHRoYXQgd2UgY2FuIGNyZWF0ZSBhIHJlcGVhdCB3 aWRnZXQgd2l0aCBhIGNob2ljZSBjb3JyZWN0bHkuIgorICAod2l0aC10ZW1wLWJ1ZmZlcgorICAg ICh3aWRnZXQtaW5zZXJ0ICJUZXN0aW5nLlxuXG4iKQorICAgIChsZXQqICgod2lkZ2V0ICh3aWRn ZXQtY3JlYXRlICdyZXBlYXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZW50 cnktZm9ybWF0ICIlaSAlZCAldiIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 dmFsdWUgJygoOnRlc3QgMikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJyhj aG9pY2UgKGNvbnN0IG5pbCkgKGNvbnN0IHQpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKGxpc3Qgc3ltYm9sIG51bWJlcikpKSkKKyAgICAgICAgICAgKGNoaWxk IChjYXIgKHdpZGdldC1nZXQgd2lkZ2V0IDpjaGlsZHJlbikpKSkKKyAgICAgICh3aWRnZXQtaW5z ZXJ0ICJcbiIpCisgICAgICAodXNlLWxvY2FsLW1hcCB3aWRnZXQta2V5bWFwKQorICAgICAgKHdp ZGdldC1zZXR1cCkKKyAgICAgIChzaG91bGQgY2hpbGQpCisgICAgICAoc2hvdWxkIChlcXVhbCAo d2lkZ2V0LXZhbHVlIHdpZGdldCkgJygoOnRlc3QgMikpKSkpKSkKKworKGVydC1kZWZ0ZXN0IHdp ZGdldC10ZXN0LXJlcGVhdC1jYW4taGFuZGxlLWlubGluYWJsZS1jaG9pY2UgKCkKKyAgIlRlc3Qg dGhhdCB3ZSBjYW4gY3JlYXRlIGEgcmVwZWF0IHdpZGdldCB3aXRoIGFuIGlubGluYWJsZSBjaG9p Y2UgY29ycmVjdGx5LiIKKyAgKHdpdGgtdGVtcC1idWZmZXIKKyAgICAod2lkZ2V0LWluc2VydCAi VGVzdGluZy5cblxuIikKKyAgICAobGV0KiAoKHdpZGdldCAod2lkZ2V0LWNyZWF0ZSAncmVwZWF0 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmVudHJ5LWZvcm1hdCAiJWkgJWQg JXYiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOnZhbHVlICcoOnRlc3QgMikK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKGNob2ljZSAoY29uc3QgbmlsKSAo Y29uc3QgdCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobGlz dCA6aW5saW5lIHQgc3ltYm9sIG51bWJlcikpKSkKKyAgICAgICAgICAgKGNoaWxkICh3aWRnZXQt Z2V0IHdpZGdldCA6Y2hpbGRyZW4pKSkKKyAgICAgICh3aWRnZXQtaW5zZXJ0ICJcbiIpCisgICAg ICAodXNlLWxvY2FsLW1hcCB3aWRnZXQta2V5bWFwKQorICAgICAgKHdpZGdldC1zZXR1cCkKKyAg ICAgIChzaG91bGQgY2hpbGQpCisgICAgICAoc2hvdWxkIChlcXVhbCAod2lkZ2V0LXZhbHVlIHdp ZGdldCkgJyg6dGVzdCAyKSkpKSkpCisKKyhlcnQtZGVmdGVzdCB3aWRnZXQtdGVzdC1saXN0LWNh bi1oYW5kbGUtY2hvaWNlICgpCisgICJUZXN0IHRoYXQgd2UgY2FuIGNyZWF0ZSBhIGxpc3Qgd2lk Z2V0IHdpdGggYSBjaG9pY2UgY29ycmVjdGx5LiIKKyAgKHdpdGgtdGVtcC1idWZmZXIKKyAgICAo d2lkZ2V0LWluc2VydCAiVGVzdGluZy5cblxuIikKKyAgICAobGV0KiAoKHdpZGdldCAod2lkZ2V0 LWNyZWF0ZSAnbGlzdAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDp2YWx1ZSAn KCgxICJPbmUiKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKGNob2ljZSBz dHJpbmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobGlzdCBu dW1iZXIgc3RyaW5nKSkpKQorICAgICAgICAgICAoY2hpbGQgKGNhciAod2lkZ2V0LWdldCB3aWRn ZXQgOmNoaWxkcmVuKSkpKQorICAgICAgKHdpZGdldC1pbnNlcnQgIlxuIikKKyAgICAgICh1c2Ut bG9jYWwtbWFwIHdpZGdldC1rZXltYXApCisgICAgICAod2lkZ2V0LXNldHVwKQorICAgICAgKHNo b3VsZCBjaGlsZCkKKyAgICAgIChzaG91bGQgKGVxdWFsICh3aWRnZXQtdmFsdWUgd2lkZ2V0KSAn KCgxICJPbmUiKSkpKSkpKQorCisoZXJ0LWRlZnRlc3Qgd2lkZ2V0LXRlc3QtbGlzdC1jYW4taGFu ZGxlLWlubGluYWJsZS1jaG9pY2UgKCkKKyAgIlRlc3QgdGhhdCB3ZSBjYW4gY3JlYXRlIGEgbGlz dCB3aWRnZXQgd2l0aCBhbiBpbmxpbmFibGUgY2hvaWNlIGNvcnJlY3RseS4iCisgICh3aXRoLXRl bXAtYnVmZmVyCisgICAgKHdpZGdldC1pbnNlcnQgIlRlc3RpbmcuXG5cbiIpCisgICAgKGxldCog KCh3aWRnZXQgKHdpZGdldC1jcmVhdGUgJ2xpc3QKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6dmFsdWUgJygxICJPbmUiKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICcoY2hvaWNlIHN0cmluZworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIChsaXN0IDppbmxpbmUgdCBudW1iZXIgc3RyaW5nKSkpKQorICAgICAgICAgICAoY2hp bGQgKGNhciAod2lkZ2V0LWdldCB3aWRnZXQgOmNoaWxkcmVuKSkpKQorICAgICAgKHdpZGdldC1p bnNlcnQgIlxuIikKKyAgICAgICh1c2UtbG9jYWwtbWFwIHdpZGdldC1rZXltYXApCisgICAgICAo d2lkZ2V0LXNldHVwKQorICAgICAgKHNob3VsZCBjaGlsZCkKKyAgICAgIChzaG91bGQgKGVxdWFs ICh3aWRnZXQtdmFsdWUgd2lkZ2V0KSAnKDEgIk9uZSIpKSkpKSkKKworKGVydC1kZWZ0ZXN0IHdp ZGdldC10ZXN0LW9wdGlvbi1jYW4taGFuZGxlLWNob2ljZSAoKQorICAiVGVzdCB0aGF0IHdlIGNh biBjcmVhdGUgYSBvcHRpb24gd2lkZ2V0IHdpdGggYSBjaG9pY2UgY29ycmVjdGx5LiIKKyAgKHdp dGgtdGVtcC1idWZmZXIKKyAgICAod2lkZ2V0LWluc2VydCAiVGVzdGluZy5cblxuIikKKyAgICAo bGV0KiAoKHdpZGdldCAod2lkZ2V0LWNyZWF0ZSAncmVwZWF0CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOnZhbHVlICcoKCJmb28iKSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAnKGxpc3QgKG9wdGlvbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKGNob2ljZSBzdHJpbmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKGxpc3QgOmlubGluZSB0CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bWJlciBzdHJpbmcpKSkpKSkK KyAgICAgICAgICAgKGNoaWxkIChjYXIgKHdpZGdldC1nZXQgd2lkZ2V0IDpjaGlsZHJlbikpKSkK KyAgICAgICh3aWRnZXQtaW5zZXJ0ICJcbiIpCisgICAgICAodXNlLWxvY2FsLW1hcCB3aWRnZXQt a2V5bWFwKQorICAgICAgKHdpZGdldC1zZXR1cCkKKyAgICAgIChzaG91bGQgY2hpbGQpCisgICAg ICAoc2hvdWxkIChlcXVhbCAod2lkZ2V0LXZhbHVlIHdpZGdldCkgJygoImZvbyIpKSkpKSkpCisK KyhlcnQtZGVmdGVzdCB3aWRnZXQtdGVzdC1vcHRpb24tY2FuLWhhbmRsZS1pbmxpbmFibGUtY2hv aWNlICgpCisgICJUZXN0IHRoYXQgd2UgY2FuIGNyZWF0ZSBhIG9wdGlvbiB3aWRnZXQgd2l0aCBh biBpbmxpbmFibGUgY2hvaWNlIGNvcnJlY3RseS4iCisgICh3aXRoLXRlbXAtYnVmZmVyCisgICAg KHdpZGdldC1pbnNlcnQgIlRlc3RpbmcuXG5cbiIpCisgICAgKGxldCogKCh3aWRnZXQgKHdpZGdl dC1jcmVhdGUgJ3JlcGVhdAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDp2YWx1 ZSAnKCgxICJPbmUiKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKGxpc3Qg KG9wdGlvbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNob2lj ZSBzdHJpbmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGxpc3QgOmlubGluZSB0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIG51bWJlciBzdHJpbmcpKSkpKSkKKyAgICAgICAgICAgKGNoaWxk IChjYXIgKHdpZGdldC1nZXQgd2lkZ2V0IDpjaGlsZHJlbikpKSkKKyAgICAgICh3aWRnZXQtaW5z ZXJ0ICJcbiIpCisgICAgICAodXNlLWxvY2FsLW1hcCB3aWRnZXQta2V5bWFwKQorICAgICAgKHdp ZGdldC1zZXR1cCkKKyAgICAgIChzaG91bGQgY2hpbGQpCisgICAgICAoc2hvdWxkIChlcXVhbCAo d2lkZ2V0LXZhbHVlIHdpZGdldCkgJygoMSAiT25lIikpKSkpKSkKKwogOzs7IHdpZC1lZGl0LXRl c3RzLmVsIGVuZHMgaGVyZQotLSAKMi4yOS4yCgo= --0000000000001e155f05b442068d-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 17 12:57:16 2020 Received: (at 44579) by debbugs.gnu.org; 17 Nov 2020 17:57:16 +0000 Received: from localhost ([127.0.0.1]:32859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf5EB-0001ew-Sx for submit@debbugs.gnu.org; Tue, 17 Nov 2020 12:57:16 -0500 Received: from aibo.runbox.com ([91.220.196.211]:42038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf5E9-0001en-11 for 44579@debbugs.gnu.org; Tue, 17 Nov 2020 12:57:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zaeph.net; s=selector2; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From; bh=AogF+eOURI3r8hVEs2my8+XromLJJ4v2i7jPB9mvLYs=; b=3BOyUALtwbpmym+MeTOj1iHF8/ GLJ0EsZJw+y/9LNRpyzfocNTCPn5SENo/TYFgFwdABJJmr2PoVndFepaOhopZmhsk5u5lDPDQEoZr qv/kwB/FDmSur32SwLurbU0R5yFmR+qUAwISZHATCiOFCkQZMDUGYor1xf2KD7yZlBM90fD9FZYMN vvpQT9QCu2iqs2u9sysBj4/rHCDShoSzSfjwvDW4boOEijPtFeXZEpNU0u5ycWWRfQQl+pQ3auEH5 UZPtK72OMF3TB3hCcZ5lnEejbWK2hObpcygOp/eDtYZ2l7PpMHFu1pWWC1nT6Uh/oMPePTD+116zC /CUbUG0A==; Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1kf5E7-0007FA-4W; Tue, 17 Nov 2020 18:57:11 +0100 Received: by submission02.runbox with esmtpsa [Authenticated alias (984850)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1kf5Dl-0004lP-NC; Tue, 17 Nov 2020 18:56:49 +0100 From: Leo Vivier To: Mauro Aranda Subject: Re: bug#44579: Unintended behaviour with =?utf-8?Q?defcustom?= =?utf-8?Q?=E2=80=99s_=E2=80=98choice=E2=80=99?= widgets and ":inline t" & Wrong documentation on "(elisp) Splicing into Lists" In-Reply-To: References: Date: Tue, 17 Nov 2020 18:56:48 +0100 Message-ID: <874kln27fj.fsf@hidden> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 44579 Cc: 44579@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.7 (-) Hi there, Mauro Aranda writes: > * lisp/wid-edit.el (choice): New property, :inline-bubbles-p. A > predicate that returns non-nil if the choice widget can act as an > inline widget. Document it. > (widget-choice-inline-bubbles-p): New function, for the > :inline-bubbles-p property of the choice widget. > (widget-inline-p): New function. Use the :inline-bubbles-p property > of the widget, if any. > (widget-match-inline): Use the above to see if the widget can act like > an inline widget. Document it. > (widget-choice-value-create): Account for the case of a choice widget > that has inline members. > (widget-checklist-add-item, widget-editable-list-value-create) > (widget-group-value-create): Use widget-inline-p rather than just > checking for a non-nil :inline property, allowing these functions to > pass the complete information to widgets like the choice widget to > create their values. > > * test/lisp/wid-edit-tests.el (widget-test-choice-match-no-inline) > (widget-test-choice-match-all-inline) > widget-test-choice-match-some-inline): New tests, to check that choice > widgets can match its choices, inline or not. > (widget-test-inline-p): New test, for the new function > widget-inline-p. > (widget-test-repeat-can-handle-choice) > (widget-test-repeat-can-handle-inlinable-choice) > (widget-test-list-can-handle-choice) > (widget-test-list-can-handle-inlinable-choice) > (widget-test-option-can-handle-choice) > (widget-test-option-can-handle-inlinable-choice): New tests. This > grouping widgets need to be able to create a choice widget regardless > if it has inline choices or not. Thank you for your work and for the patch. Best, -- Leo Vivier Freelance Software Engineer Website: www.leovivier.com | Blog: www.zaeph.net From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 01:36:59 2020 Received: (at 44579) by debbugs.gnu.org; 24 Nov 2020 06:36:59 +0000 Received: from localhost ([127.0.0.1]:53690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khRwh-0004vM-Dy for submit@debbugs.gnu.org; Tue, 24 Nov 2020 01:36:59 -0500 Received: from quimby.gnus.org ([95.216.78.240]:49636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khRwg-0004v9-3j for 44579@debbugs.gnu.org; Tue, 24 Nov 2020 01:36:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RVB46cjehjUA6e2bUFOpGit2ZWQZIUaVZawS8SMI9gs=; b=qo+E0Ar/qujq65tmqquK1dprJL uw2Nl0Hm6IueFRN6JsVTJxFinjcIowYfTprXInDwv8ihCr01Kw+7NKEvgbquW2OoDwRjZoE1lFkul pYF+eEYFlUCT8/kLKToopjTRpzLTbmVMHSAwgmQ2mwOmUynEFl9jf9EBO7xZOgFCC0Ds=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khRwX-0000Qn-C7; Tue, 24 Nov 2020 07:36:51 +0100 From: Lars Ingebrigtsen To: Mauro Aranda Subject: Re: bug#44579: Unintended behaviour with =?utf-8?Q?defcustom?= =?utf-8?Q?=E2=80=99s_=E2=80=98choice=E2=80=99?= widgets and ":inline t" & Wrong documentation on "(elisp) Splicing into Lists" References: <87lff7yksx.fsf@hidden> X-Now-Playing: The Police's =?utf-8?Q?=5FZenyatt=C3=A0?= Mondatta_: "Behind My Camel [Instrumental]" Date: Tue, 24 Nov 2020 07:36:48 +0100 In-Reply-To: (Mauro Aranda's message of "Mon, 16 Nov 2020 20:48:54 -0300") Message-ID: <87zh379s73.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mauro Aranda writes: > The patch to wid-edit.el is a little larger, because once the choice > widget can match inline values, then it has to be able to create them. Looks good to me; go ahead and push. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44579 Cc: Leo Vivier , 44579@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 (-) Mauro Aranda writes: > The patch to wid-edit.el is a little larger, because once the choice > widget can match inline values, then it has to be able to create them. Looks good to me; go ahead and push. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 06:33:43 2020 Received: (at 44579) by debbugs.gnu.org; 24 Nov 2020 11:33:43 +0000 Received: from localhost ([127.0.0.1]:57823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khWZr-00079x-AK for submit@debbugs.gnu.org; Tue, 24 Nov 2020 06:33:43 -0500 Received: from mail-qv1-f54.google.com ([209.85.219.54]:44496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khWZo-00079e-1t; Tue, 24 Nov 2020 06:33:41 -0500 Received: by mail-qv1-f54.google.com with SMTP id 62so190443qva.11; Tue, 24 Nov 2020 03:33:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:from:to:cc:subject:in-reply-to:date:mime-version; bh=bbbrA6GgPujUvjZAHBzGA2PtqbQ1rsc7O8ojFqnY3rQ=; b=Jn69R+b4mehyok2W6hoQxqiRVJ7vHzwwl5eGG/+jS0hDVDfqS54OB1002ZvANht1jN o/C4a0uz0XdO34TxjiSYvqFdWgyrnFCxaWszm9R4aBcqFnrktHgAZmez0UY6gcTx9HzS lmQuCzrLw5EDGjQm/YXBmj/yiS45gYd9pCTpsML+6ohR2/ORQNuNYIHzR9xeHrKPuoul Mw4GLU12/BJNGGxde8KzBvIATcJD3oGHxQmO+8oU50+4QK5woNulP19cAG1wvabEhRgZ za0MnwSXj6KLT0wa6jljpvA2UucyB9J6by/i1wCDUeh1vIJ/41cvdEDHWFoq0bXY8TR0 Pp/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:from:to:cc:subject:in-reply-to:date :mime-version; bh=bbbrA6GgPujUvjZAHBzGA2PtqbQ1rsc7O8ojFqnY3rQ=; b=VKmKwHKt2oCjKvJvLxBFqiwjf4X8AozOcJ6zC4NLp9nj1zf/xTPB2W82M8ZYAeIncu bQPhBfQAv1A2+rpa8wv3rITVBi8Jd9G5DknR9Jg+uXlCENYvjU7QSy6XkDW6uGdGMR6w l8nqrGOOJO9oWyOUWdj0oCsihfg9YDoZqkOmUvZZVDvzGnF3lnnsPItAlU7ve7CRs28j OsDZxyevUq0uTLecp8Rc+03XQPkisjUimyJipYO3AIEdSGQKe4+mFWP2z/1+5fkGF48q 6hxefeyr1SZ3V2VEq97A+U0FUw7TJFPtlqYkSTmNoMbNknOmgYErnlzKqN4+lL9gXMZf zOfg== X-Gm-Message-State: AOAM530xKPl/WoX95Rr/EXhFgr/+1tjnu2iuf4/LkYvOjPekz4powA4N fCyIRo/Z63uM9UNsxqAgIgcNwxXRIVV5lg== X-Google-Smtp-Source: ABdhPJwbdbSjcC4TKWrDYWkTQ6jCEygiOY20K/i3J09QuqcHI5hJJvMnhy15/fO1jRTkNuYhKf6H3g== X-Received: by 2002:ad4:490d:: with SMTP id bh13mr4393210qvb.14.1606217613848; Tue, 24 Nov 2020 03:33:33 -0800 (PST) Received: from tbb-desktop ([201.213.132.172]) by smtp.gmail.com with ESMTPSA id l62sm12716397qkf.121.2020.11.24.03.33.31 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Nov 2020 03:33:33 -0800 (PST) Message-ID: <5fbcef8d.1c69fb81.de622.d347@mx.google.com> X-Google-Original-Message-ID: <87r1ojgfau.fsf@maurooaranda@gmail.com> From: Mauro Aranda To: Lars Ingebrigtsen Subject: Re: bug#44579: Unintended behaviour with =?utf-8?Q?defcustom?= =?utf-8?Q?=E2=80=99s_=E2=80=98choice=E2=80=99?= widgets and ":inline t" & Wrong documentation on "(elisp) Splicing into Lists" In-Reply-To: <87zh379s73.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 24 Nov 2020 07:36:48 +0100) Date: Tue, 24 Nov 2020 08:33:29 -0300 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44579 Cc: zaeph@zaeph.net, 44579@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 (-) tags 44579 fixed close 44579 28.1 quit Lars Ingebrigtsen writes: > Mauro Aranda writes: > >> The patch to wid-edit.el is a little larger, because once the choice >> widget can match inline values, then it has to be able to create them. > > Looks good to me; go ahead and push. Thanks, done. From unknown Mon Jun 16 23:36:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 22 Dec 2020 12:24:10 +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