From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#46243: 26.3; If invoke menu item that reads a char, get keystrokes echo Date: Mon, 1 Feb 2021 18:50:56 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17785"; mail-complaints-to="usenet@ciao.gmane.io" To: 46243@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 01 19:52:22 2021 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 1l6eJC-0004Wf-L7 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Feb 2021 19:52:22 +0100 Original-Received: from localhost ([::1]:36006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6eJB-0005Vl-Nl for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Feb 2021 13:52:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6eIs-0005VQ-UL for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2021 13:52:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49895) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6eIs-0001cB-Lq for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2021 13:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l6eIs-0008C3-Iq for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2021 13:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Feb 2021 18:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46243 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.161220548031429 (code B ref -1); Mon, 01 Feb 2021 18:52:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Feb 2021 18:51:20 +0000 Original-Received: from localhost ([127.0.0.1]:33205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6eIA-0008Aq-41 for submit@debbugs.gnu.org; Mon, 01 Feb 2021 13:51:19 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:58270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6eI6-0008Ag-Ip for submit@debbugs.gnu.org; Mon, 01 Feb 2021 13:51:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6eI6-0005Oe-44 for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2021 13:51:14 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:59004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6eI2-00014c-6L for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2021 13:51:13 -0500 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 111IYpoO074746 for ; Mon, 1 Feb 2021 18:51:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=lEsx/rNZcOZYpvU/UTxdAt9s5r6lg+vbZzsCwCikI/4=; b=BTIHKXFuwxgkXrHVqPB+fG6MUed7bhW+xagAe0M5YM2PZYdLg5pjlfhZ95qQpV/AeHcC YbUzF9Gf5VHEB1bWmQ6xiTEVJyXEgkGkZhnKXVVxdz1sW0DE8aSf6QojbXwpPPm7SptC /Iyy7Q6BlA2CHOBj8d3eIVmyV6bxWljkLcvwdq7HYXcFV1UREdGGxndarWgUzh95YbGQ T3PdN7wQkblPDkhy1Dq9Gd8BShkOY19J9Q9r6XdaGBAv9ahDi96F++qwOA1z9wd22LoN KGCJvuq9Vwio7bv3z3P/NO5dAQq1o9g9PAdCb1/xm5KD6d9gSVrYqWE2DZ6f2cDVljHF uw== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 36cydkpv4p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 01 Feb 2021 18:51:07 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 111IoUNl051609 for ; Mon, 1 Feb 2021 18:51:06 GMT Original-Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2175.outbound.protection.outlook.com [104.47.55.175]) by userp3030.oracle.com with ESMTP id 36dhcvdr0g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 01 Feb 2021 18:51:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fa/iIq14CJlp66oZjBs+k0g0d4AkJo2BxKB8awKGPdrbcDNtyt26Kl9q9pQsdbzbmwPb0okxJoIOfVJXHQl5svX8C8e0CLUhuNWRlAN3sfcb0IX9vZ4IGSQssc4qxlHo8e0e/FXDZkF24R1MjELCFnPjVjkOf/N4UP5S3NC/yzFA7FJeLqzneLfFtxXjkUCOKAa1AkctqIoRvBWn6i8tQ6OEV2gBbMebvCLAeG+hNEywaapM2uJZHOjMzyEI/fNxMB/oEXLSF2L6vxxiXkkVyKDFNmSaqOoif7scKi/9wdzfmkudBWILfqPcArS19tydJRW47wCjzPM5NAKOcYhLvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lEsx/rNZcOZYpvU/UTxdAt9s5r6lg+vbZzsCwCikI/4=; b=YjFGijkqglWmQZ3TRr6eYNg0vBWI7vAyIbbboqxQFTXX/LisU4hx72avudj3j7u/xpmlfC2R6Qg+Puevsq4wCoJ8ooSfmT/HKoSZZrZnzfAD9lBFjixQSKFxxsFD66k+Vul6rq5T4HB14PyU/SkvElWdmh9e365khgUDP965bUsvy6HdN8GDAIevOZ3mDnYcCA1Y/HIaYAxnH2gW8JwJ+neEfvjejvf/cLpEtVYmitFtHnYSqYBu60rOd54o3KyKKjEG/I3XOupK9trZzjds/Qx+fwbItapkIK4aXlMDJQPcGRISw84GYYdBSxVBjZFoUWV1CRIpcw3XKsF0ph+2KA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lEsx/rNZcOZYpvU/UTxdAt9s5r6lg+vbZzsCwCikI/4=; b=jdLIB32piNOPTtsu2d4AirFeVg2Khy2n0v06yG3xznz/I2kFiDlgwEJ5Dmj7u0Qkt1M5UZDvmy0+aB8P5+R56i9IwmFxX9HVXGdE5FhQq4YInOXSalmpbztbpP/+ukP1j50TiedCJhqSTbSe4BRtXvQB5YTlA9pQFmCNerQxwEk= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SN6PR10MB2431.namprd10.prod.outlook.com (2603:10b6:805:49::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.16; Mon, 1 Feb 2021 18:50:56 +0000 Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::dc4d:9cd0:2010:daa2]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::dc4d:9cd0:2010:daa2%7]) with mapi id 15.20.3805.026; Mon, 1 Feb 2021 18:50:56 +0000 Thread-Topic: 26.3; If invoke menu item that reads a char, get keystrokes echo Thread-Index: Adb4yxz9h8AK/wJGQNC7uddIZgox7Q== Accept-Language: en-US Content-Language: en-US authentication-results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=oracle.com; x-originating-ip: [73.170.83.28] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: da87122e-5ddf-4501-5bb3-08d8c6e24f5d x-ms-traffictypediagnostic: SN6PR10MB2431: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 81z6jEZhNkmhPhoDWtBWl7C+ZKbYetcIXocy4Sqq0MBV6kdQb88wVUsUhO9pufU7mBeq21Lhjnem2DPnbIN5CLUps8gNcmAszymzVtxUHO5HEwMs0GLwJ0U2uezKeNAGkoPkzRV8bmVt1+faEo+3K1osbc8XqRgEamZrHFAnsPuX5eTflre6Z9IJbvTYDjANFmQOj+qWnIPQ8F5946FJHCtZze8tB77e74K8O28CkDzkMJkwMKCdnzVa9YQkPjPwnWoJmB2JJRI2knwXZIxPda3Xfn7vn1693JTuhF0n8Y1+SNy+fYEPcixGDy82UnznI9isq97rxOdg9sOYbF7oFt6qCiWNc2jjB/lN2k+dB6drNL9cAzG8LXM6VgAl8Ed84nnV6tqNM1M3gPHI1WncxL8JCCdt0n23MyF/aOlE/gM2h1g9PKWaxSt153plhkYyyMMLsulkUQJg8c+ZSvdCeH4H7jIf/7HH39gOnl1WJ3yrdktzCCY6JHlXoxRw7ym76Sud7os6vXZ29gJT2FLxhw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(136003)(39860400002)(376002)(396003)(366004)(6506007)(45080400002)(76116006)(66556008)(9686003)(64756008)(8936002)(186003)(2906002)(6916009)(66446008)(7696005)(26005)(478600001)(55016002)(71200400001)(33656002)(66946007)(66476007)(8676002)(44832011)(316002)(86362001)(5660300002)(83380400001)(52536014); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: pfSPUxxq6QjcGtWrJiKJ8GEKDIBfT9zwE6z+q9T/JM2FI9HOCjIA+TP7tQymsDJmQZqZl/4OteCF/+UN65J18X6dxJWyBF99caecCbHhAQT+qPELiTmtx3ISs5p2hfO5uq9KPhBHTe2XMxhxv3yLiFO7mpT41dJ0fgg/vXxURzyi4ng+OeSYoCDgRxkAFbk7a3oHc0NtU5CHk0C/4se0W1AaqLOTUcweWzH3CGdw9BgMHeWrizvRNwNyFEUI6bD7N23CYAb5fO6pl2Hd9feVU+REYOQVCT2n04kHk4Iyfy+0AETkz94Qk4uYwG2EWJO+5D/QNqMNqWmxr0jqJBLoU/vQ0DILSQ7sMgbgl7kGiX64p2KvJCxqOLnC/+rve07bwPH6W2t8WmXO+u3Y5+9MuyKUFs+L1SY3eppTFkcxqQJR9CjgAlJVzE3Fx3BBHjcRpJrp3zSYTQFi+Bm5ZPTEqQ6Kn/sy51PF3/7QK8jTohAdJlrYCL9m1u+1qz7tsMyk5p4NZ+wnBkB4E6Q/nhqJlh18XXCvk4U5Rb0UZXHS6N+mwPHL1aCCUX2/zYb8EiOBNwU9M4CGlWaTUDJmjef9ZA0qgjis6mpoUB1smAPHczOur3tYi2yuOf9udhFXdCVn+TuzeT4nND6ywSerc8pUqLV+LYcEdwah32oXvXvVNELMzfploxdKvPYpDQhJhqz+7lcx0pj7R6NoWRuOXH/LJL0N5aA2qL0OyW/niSUmYaY= x-ms-exchange-transport-forked: True X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: da87122e-5ddf-4501-5bb3-08d8c6e24f5d X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Feb 2021 18:50:56.8416 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: aIPrUo+VCXCIS9X51fI9pjP3ESaOHQU9w26eIsMRdCsrPuzIW+x2BRq2iiAHN8rd7sbX6ZPGs8UXyW+n+W82QA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2431 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9882 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102010097 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9882 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102010096 Received-SPF: pass client-ip=141.146.126.78; envelope-from=drew.adams@oracle.com; helo=aserp2120.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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" Xref: news.gmane.io gmane.emacs.bugs:199102 Archived-At: There's no doubt a simpler thing to repro this with. Sorry, I'm pressed for time. I see this starting with Emacs 24, and still in Emacs 27.1. There's no such problem before Emacs 24. If I have a menu item that reads a character, the prompt for that read is not seen; the menu selection key sequence gets echoed instead. This shouldn't happen (should it?). Binding `echo-keystrokes' in the command's `interactive' spec doesn't prevent this. The workaround I've found is to add a call to (message nil). Example command: (defun diredp-mark-with-char (char &optional arg) "Mark this line with CHAR. With numeric prefix arg N, mark the next N lines." (interactive (progn (message nil) (list (read-char "Mark this line with char: ") (prefix-numeric-value current-prefix-arg)))) (let ((dired-marker-char char)) (dired-mark arg))) If the `interactive' spec does not have that (message nil) then it doesn't work - you then see the menu-invocation key sequence instead of the prompt. And this is so whether I use "cChar: \np" or a sexp with `read-char'. If I change to reading a string then there's no such problem: (defun diredp-mark-with-char (char &optional arg) "Mark this line with CHAR. With numeric prefix arg N, mark the next N lines." (interactive "sChar: \np") (let ((dired-marker-char (string-to-char char))) (dired-mark arg))) So that's another possible workaround. (Is one of those better?) Haven't been able to see why this problem occurs. This is the menu item I have for the above command: (define-key diredp-marks-mark-menu [diredp-mark-with-char] '(menu-item "Mark This with Char..." diredp-mark-with-char :visible (not (diredp-nonempty-region-p)) :help "Mark this line with a character you type")) I see the problem also with `easy-menu-create-menu': (easy-menu-create-menu "This File" '(["Mark with Char..." diredp-mark-with-char])) Please advise. Am I missing something? As I say, this was not a problem before Emacs 24. In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd Windowing system distributor `Microsoft Corp.', version 10.0.18362 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3''