From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#64046: 30.0.50; Quoting in customize choice tags Date: Thu, 20 Jul 2023 17:48:27 +0200 Message-ID: <87v8eelh2s.fsf@gmx.net> References: <8ca48b5a-1619-8da8-ae3a-6ae96351a19d@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6252"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 64046@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 20 17:49:39 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 1qMVuM-0001Sh-FL for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Jul 2023 17:49:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qMVu5-0005s0-5b; Thu, 20 Jul 2023 11:49:21 -0400 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 1qMVtp-0005qe-0x for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2023 11:49:06 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qMVtn-0001zb-J2 for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2023 11:49:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qMVtm-0005so-Ev for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2023 11:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Jul 2023 15:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64046 X-GNU-PR-Package: emacs Original-Received: via spool by 64046-submit@debbugs.gnu.org id=B64046.168986811922570 (code B ref 64046); Thu, 20 Jul 2023 15:49:02 +0000 Original-Received: (at 64046) by debbugs.gnu.org; 20 Jul 2023 15:48:39 +0000 Original-Received: from localhost ([127.0.0.1]:59498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMVtP-0005rx-63 for submit@debbugs.gnu.org; Thu, 20 Jul 2023 11:48:39 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:38931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMVtM-0005rC-Bc for 64046@debbugs.gnu.org; Thu, 20 Jul 2023 11:48:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1689868109; x=1690472909; i=stephen.berman@gmx.net; bh=IpK7PAsLE6eaYe5Qj8wokoukXYuXpwmU0wiHNdzYYeU=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=mIKpuU8j9CyJnHHm5PnHSLLmidxdxnbvPCmuVpbV1zcDDNfBu4zUJd6BMaTJ/HS5QrybWhB w/RWQuNfpYruxikbRAOi8zJSQA78xDlZB/hWTIAvlX/wKkXgjkHh87fThV4OTYJA+9oIze/Mf iNY3yYMCaj305RtxO9DrW3/4TAthtgxC09eyD46bcy0X0QV+j0MOny4mtGIPbbVIE1Sns6/pY 6fz2jACoaZE94ArooI3MLbCuBaIGT22ehqQvs2p4NaRoW5yLPgAMm9QAHib/sbMUhx6tVGt3u iqRuxwsg8LYX1V1ODDJThOZnpoJA5Z8BLjmP2Q+COYZyNIoAE7wg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfssd ([89.246.37.91]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M72sP-1qHGxm0scJ-008Yuo; Thu, 20 Jul 2023 17:48:29 +0200 In-Reply-To: <8ca48b5a-1619-8da8-ae3a-6ae96351a19d@gmail.com> (Mauro Aranda's message of "Sat, 15 Jul 2023 10:20:17 -0300") X-Provags-ID: V03:K1:/VCMTmOnN2GLJ1TJk0YWLKa+JvVtMROobfh+/rXkES55YidTsPY 1OpYwFcOuUh8g59ARQ3M1BvtKZC4T1ZTwCx4Pnsq3UNFnq9yElvy1JGAhU3vgvBiRR+lg88 iI6ZyqBmiKmFwczw3qtJMuntdMV9gGF770f7O1I8ilCk6+i1LJ/ymr1cVLQycNuN5YunFaD 2JvghNQFIa81goACCjvGw== UI-OutboundReport: notjunk:1;M01:P0:fQTwR0SZGBc=;fSicFhf04psBS4NBOycIpMrQRET Q6awhtHeZ8o7dEuaUnxflKaSP1f+OMFqxQwAG1GL1wlhcPkSd8SoedKzl5ALFOuCXb2A7+LK4 nCxkIHY4CGzxzmGZEzuuT4EMmcr7r28ZqX6Hg3Dv6sFy6iaf81sl6QLq366zyIgW+St77AOPy 4PriIdbKh6TFITbuaY2OARl9s5qM296uS3Ao1jwNNP8+DhBroFrV4QUrxHPKu3uoXgTO0Hq/M R3KdCHhadaUN+dgER+Sh5XXAxe5+NgdKZFddYSuYAaPeLc979f4jMwqStEsf4SmldMq+IT8Vs Ae3b6bjYIWoEWBZDrWC8tKd92+vvg6p6fT3/eqFqv4khuidxZXLPUbqwmIqGTpV1ibrsUI4il OmrcMlFI+kWojK/L/UAW7Ly4ge8D02YQC5AYJ89CG5pv89peKD/sYQIdyzEH3yLkTxXydI2Cq UQ92XWIRNj1gFgvt5PLovp86DXFZP0gky4AiGwyuDsvjoDwq5lDKkQ8K+b2fUKAyobi4s0m9I Bjd2NGTmScxYimlwo5/zT5r6XVK2zqG9IDahaXWxJu+v7slsGNIvyP4IWpWQblIgFAlD+TINg icSaOtKpet6+UtqBrL/k7AAtb8lhZWWBNRSj5qgE8k/HrB+RHDxfveIQGKueDUe/aussiB+hn WuSl14vW67XpNJRvIniJze0+iCHrmya8pvmWA9a+2/fIeBfGyeIPw4Qmb6g9rAp+X0w/So1fj QKmpYhe3J4w+Yjv41h+lhtuUWsCpOseMTOwKSVYOgFJbVv4qPdzHUudWVStPWNhyyYKD9H+d 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:265608 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sat, 15 Jul 2023 10:20:17 -0300 Mauro Aranda wr= ote: > Stephen Berman writes: > >> On Thu, 22 Jun 2023 19:59:26 -0300 Mauro Aranda > wrote: [...] >>> Since there's no problem with widget--simplify-menu, the patch looks >>> good to me. >> >> Thanks.=C2=A0 So Eli, should this go into master, since it's not a >> regression, or is it ok to install this to the release branch?=C2=A0 It = does >> seem pretty safe, since it's only applying substitute-command-keys in a >> few more places in widget-choose. >> >> Steve Berman > > Turns out this code introduces regressions when customizing faces. > > With emacs -Q: > M-x customize-face RET default > Action the State button and choose: "For All Kinds of Displays" > Action the Display menu and select "specific display" > Wrong type argument: number-or-marker-p, "=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 " > > The substitute-command-keys operation is too destructive, and messes > with things it shouldn't be modifying, like the :offset property of > widgets in this case. Sorry for not responding sooner; I was travelling and only now had time to look into this. If I debugged it correctly, the problem is that the value of :extra-offset, 9, satisfies char-or-string-p, so then due to my patch substitute-command-keys turns it into a string containing a TAB. The cases intended to be fixed by my patch are where strings with grave quoting occur, which should be turned into strings with curve quoting. If so, then testing for stringp suffices, and the attached patch avoids the regression you found and gives the desired results for the other cases discussed in this bug. I don't know why I used char-or-string-p instead of stringp in my original patch, and don't see a reason for it now. Or do you know of cases where testing for stringp is insufficient? Steve Berman --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: widget-choose patch diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 234f3d9b74d..606093fd293 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -286,7 +286,7 @@ widget-choose (let ((items (mapc (lambda (x) (when (consp x) (dotimes (i (1- (length x))) - (when (char-or-string-p (nth i x)) + (when (stringp (nth i x)) (setcar (nthcdr i x) (substitute-command-keys (car (nthcdr i x)))))))) --=-=-=--