From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#60501: 28.2; pr-interface: widget-default-create: Wrong type argument Date: Wed, 04 Jan 2023 17:00:30 +0100 Message-ID: <87r0wai929.fsf@gmail.com> References: <878rik1yym.fsf@gmail.com> <87zgayinj6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8965"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Fernando de Morais , 60501@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 04 17:01:32 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 1pD6Cp-000288-Uu for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Jan 2023 17:01:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pD6CO-0007lE-8l; Wed, 04 Jan 2023 11:01:04 -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 1pD6CM-0007l6-Hw for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2023 11:01: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 1pD6CM-0000HJ-9e for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2023 11:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pD6CM-0008EW-3Y for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2023 11:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Jan 2023 16:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60501 X-GNU-PR-Package: emacs Original-Received: via spool by 60501-submit@debbugs.gnu.org id=B60501.167284804031613 (code B ref 60501); Wed, 04 Jan 2023 16:01:02 +0000 Original-Received: (at 60501) by debbugs.gnu.org; 4 Jan 2023 16:00:40 +0000 Original-Received: from localhost ([127.0.0.1]:49394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD6C0-0008Do-1D for submit@debbugs.gnu.org; Wed, 04 Jan 2023 11:00:40 -0500 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:34715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD6By-0008DY-Hv for 60501@debbugs.gnu.org; Wed, 04 Jan 2023 11:00:38 -0500 Original-Received: by mail-wr1-f53.google.com with SMTP id z16so16980951wrw.1 for <60501@debbugs.gnu.org>; Wed, 04 Jan 2023 08:00:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=uFjgUfRoIxb0kv5XSYdks/og5qK2oWExouZDgxQxIIQ=; b=V0aJWoLoUpxsXIDceSsqaJBaA2pH9/Gx42nsfx2tZE74MohMZY2QXYwGg5eQGLqcN/ 0wG74QdV9y4r4ddgYU1mIl85PS7paMSKaAEV0fUvne+Y4D2Xjq6LdgWmyMQ0xCZIcqOV aiRsa2AT3wakvWu5jvqJsGlBjTqAg6guOhZ1UNpU0XDoyKIBqohsYp+CKdfYxUOb3oEQ 41K+OMyaDINM8mg/gXL2mWMFyaYcb5hiAR/v/hPGXuVK1c/zXA93UQV+rxfAGg2cTvk2 hpKfQM8EWOkNul3oj3LdO5iCeAmn7GpmWa1CjH4KITh/ef74GYhceFs2GMaEbTl6LOyp nClg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uFjgUfRoIxb0kv5XSYdks/og5qK2oWExouZDgxQxIIQ=; b=Wf49++ZUWlBEKrhkfQzMtt6ty1YmR8QJoGj870bUZX+Nj0E888NKCR7sI2UEB5IfvF urrR1Vg2eWntADFuq+y36BiNPN9A7/jYhZGHTQZYa0Wjz1/N4NsQloI5fkgWsUWr8kdL yeRTOOnvA/sOTophrOnKyVNAvyF+D6bE5tsL7ehNVR17nvEQ9JrMtur9+jseoIUdhH48 u7HVZBj+IXeunuvuHfOqY8PJzP84niD3CF38O8koR4y/2ddp0zKw7v08JbB+fAZeRX0z UGTpUtee0TkOzG3l3xT1C7GEM3x3qwxxE7t1z5XsyRQt6KSlDvVXVjJPDMPcmC/fMt7h 1hAw== X-Gm-Message-State: AFqh2kpYf2LTnCniISTV8Y1lJfKNbfEvKRwdJYqJVfKw+VFcSswZ83wv VJ6Sr0v6RGM0asAVYgLUG/KTwt1eWKQ= X-Google-Smtp-Source: AMrXdXsmXbO+F55BAVQUnBLa3JfZsseHePLCFD3Zg6XK5Cf+UyN5nsrsgKwbXGnYfBrvKkvXY3KqDA== X-Received: by 2002:a05:6000:1f14:b0:242:5a34:fb7b with SMTP id bv20-20020a0560001f1400b002425a34fb7bmr30261057wrb.70.1672848032128; Wed, 04 Jan 2023 08:00:32 -0800 (PST) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id h18-20020adfa4d2000000b00241cfa9333fsm35352263wrb.5.2023.01.04.08.00.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 08:00:31 -0800 (PST) In-Reply-To: (Mauro Aranda's message of "Wed, 4 Jan 2023 12:21:55 -0300") 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:252500 Archived-At: >>>>> On Wed, 4 Jan 2023 12:21:55 -0300, Mauro Aranda said: Mauro> I don't have a lot of time right now, but I took a look at the c= ode in Mauro> printing.el and I don't really understand why its using :inline t Mauro> when creating the menu-choice widget, since the values seem to be Mauro> strings or symbols.=C2=A0 That is, nothing that needs to be inli= ned. OK. I can=CA=BCt comment on that, but we should try to be defensive Mauro> I wasn't aware of this breakage, of course, but it looks like I Mauro> should've made the code be more defensive (i.e., use car-safe in= stead of Mauro> car). How about this (using car-safe would result in nil): diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 8250316bcc7..f4a49f58bed 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -2231,7 +2231,9 @@ widget-choice-value-create (if (widget-get current :inline) (setq val value fun :match-inline) - (setq val (car value) + (setq val (if (consp value) + (car value) + value) fun :match)) (setq val value fun :match)) Robert --=20