From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Madhu Newsgroups: gmane.emacs.bugs Subject: bug#66192: 30.0.50; lisp/buttons.el (push-button) fails to handle the action on gui emacs Date: Mon, 25 Sep 2023 20:40:20 +0530 (IST) Message-ID: <20230925.204020.1677927434335496083.enometh@meer.net> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Mon_Sep_25_20_40_20_2023_168)--" Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1207"; mail-complaints-to="usenet@ciao.gmane.io" To: 66192@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 25 17:12:07 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 1qknFn-000Aco-Et for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Sep 2023 17:12:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qknFc-0003WQ-0O; Mon, 25 Sep 2023 11:11:56 -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 1qknFW-00038m-O8 for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 11:11:53 -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 1qknFW-0005Rq-Cp for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 11:11:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qknFi-00075L-EM for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 11:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Madhu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Sep 2023 15:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66192 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.169565467527163 (code B ref -1); Mon, 25 Sep 2023 15:12:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Sep 2023 15:11:15 +0000 Original-Received: from localhost ([127.0.0.1]:46435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qknEx-000743-01 for submit@debbugs.gnu.org; Mon, 25 Sep 2023 11:11:15 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:41402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qknEt-00073j-FA for submit@debbugs.gnu.org; Mon, 25 Sep 2023 11:11:13 -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 1qknEZ-0008Vp-My for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 11:10:51 -0400 Original-Received: from smtp0.ctinetworks.com ([205.166.61.207]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qknEY-0005NZ-3z for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 11:10:51 -0400 Original-Received: from localhost (unknown [117.254.36.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: enometh@meer.net) by smtp0.ctinetworks.com (Postfix) with ESMTPSA id 90AB8306F0B3 for ; Mon, 25 Sep 2023 11:10:43 -0400 (EDT) X-Mailer: Mew version 6.9 on Emacs 30.0.50 X-ctinetworks-Information: Please contact the ISP for more information X-ctinetworks-MailScanner-ID: 90AB8306F0B3.A76F3 X-ctinetworks-VirusCheck: Found to be clean X-ctinetworks-Watermark: 1696518646.27448@OvXlujjgb5JVXVjgtgWPxQ Received-SPF: pass client-ip=205.166.61.207; envelope-from=enometh@meer.net; helo=smtp0.ctinetworks.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SORBS_WEB=1.5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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:271340 Archived-At: ----Next_Part(Mon_Sep_25_20_40_20_2023_168)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit * commit a496509cedb17109d0e6297a74e2ff8ed526333c |Commit: Po Lu |CommitDate: Thu Jan 19 22:19:06 2023 +0800 Introduced a change to lisp/button.el:(push-button) which causes the following recipe to fail. Consider a buffer with the following contents: ``` ;;text-button (defvar-keymap my-button-map :parent button-map "" 'push-button) (setq $but (make-text-button 1 10 'action #'(lambda(b) (message "push-button %S" b)) 'keymap my-button-map)) ``` evaluating the buffer sets up a text button in the first line. In a gui emacs Hitting RET on the button fails with an error: "push-button: Wrong type argument: listp, return". The following patch fixes it for me but maybe there is some other issue? ----Next_Part(Mon_Sep_25_20_40_20_2023_168)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0001-lisp-button.el-push-button-handle-kbd-return.patch" >From e69be9cf0af72c5fcda8cda05b50a556741009b2 Mon Sep 17 00:00:00 2001 From: Madhu Date: Mon, 25 Sep 2023 20:20:05 +0530 Subject: [PATCH] lisp/button.el: (push-button): handle kbd --- lisp/button.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/button.el b/lisp/button.el index b01595943fc..0e98ec722d9 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -492,7 +492,7 @@ push-button (if str-button ;; mode-line, header-line, or display string event. (button-activate str t) - (if (eq (car pos) 'touchscreen-down) + (if (and (listp pos) (eq (car pos) 'touchscreen-down)) ;; If touch-screen-track tap returns nil, then the ;; tap was cancelled. (when (touch-screen-track-tap pos) -- 2.39.2.101.g768bb238c4 ----Next_Part(Mon_Sep_25_20_40_20_2023_168)----