From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#44500: 26.3; `prefix-command-echo-keystrokes-functions' causes regression Date: Mon, 11 Oct 2021 05:35:19 -0700 Message-ID: References: <31fd423d-02ea-4a0e-992e-d226108d1c07@default> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9053"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: 44500@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 11 14:36:59 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 1mZuY6-00027d-Uz for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Oct 2021 14:36:58 +0200 Original-Received: from localhost ([::1]:60354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZuY5-0006mS-UJ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Oct 2021 08:36:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZuXE-0005SS-IC for bug-gnu-emacs@gnu.org; Mon, 11 Oct 2021 08:36:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45443) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZuXE-0003Mi-9D for bug-gnu-emacs@gnu.org; Mon, 11 Oct 2021 08:36:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mZuXD-0006nX-6Y for bug-gnu-emacs@gnu.org; Mon, 11 Oct 2021 08:36:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Oct 2021 12:36:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44500 X-GNU-PR-Package: emacs Original-Received: via spool by 44500-submit@debbugs.gnu.org id=B44500.163395572726030 (code B ref 44500); Mon, 11 Oct 2021 12:36:03 +0000 Original-Received: (at 44500) by debbugs.gnu.org; 11 Oct 2021 12:35:27 +0000 Original-Received: from localhost ([127.0.0.1]:56976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZuWc-0006lk-NM for submit@debbugs.gnu.org; Mon, 11 Oct 2021 08:35:26 -0400 Original-Received: from mail-pj1-f45.google.com ([209.85.216.45]:41871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZuWb-0006lR-KN for 44500@debbugs.gnu.org; Mon, 11 Oct 2021 08:35:25 -0400 Original-Received: by mail-pj1-f45.google.com with SMTP id na16-20020a17090b4c1000b0019f5bb661f9so13399114pjb.0 for <44500@debbugs.gnu.org>; Mon, 11 Oct 2021 05:35:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=Vhj7X7WqggLhqclZXG05tdF3zXGonnD/+Ixqt3wGODg=; b=VjlaxVmBQtFgq3zzEcrFyTp5JzarzWxllt6nzrz/yUE8oRLCKbrnY+LT7+fcFJzX72 xlnLSGM8Md1WB2BUCmQT7UDbtJba5RUGcS5YioqnTY/7nQtObpLCwJT3HGIa0gLT8Cpz E9P+OWiFC8hvIZ9WljC7m63nz4atK7yVljWVNvxuctEr9BX1gQe9M8/4Zf5Mbm+FhHD5 CpFCyov1WaV9ghzp/S6PTBDeqadULBElTL/o3apld7GOEAPcCckTqwMFzgA9S6fKJD3L HeAQ6yMTNPj0X/8Cuwl105ZrMu/iuAhquh6Lm0LMh+VEPNxYnuqlJ30varXZdv4JWd4m Q8nQ== X-Gm-Message-State: AOAM533EDrN9wzp+YJzSMRR3Hhoc6JJtU5lbdi+j0L5/ORBZcFeZStyv VRmQTpMYMpmVRvb1ZjjH5uJBvWRaQ+F80UUM/PTbfp7x X-Google-Smtp-Source: ABdhPJzfVSEsX9lJQQNsT/pNmm4s/APJ/LKsQl6PnRRQbzVFlR4B++itT7g08ornKdu93QAAepVkIJ1KY+S+rjgSrMI= X-Received: by 2002:a17:90a:460a:: with SMTP id w10mr30496348pjg.132.1633955719994; Mon, 11 Oct 2021 05:35:19 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 11 Oct 2021 05:35:19 -0700 In-Reply-To: <31fd423d-02ea-4a0e-992e-d226108d1c07@default> (Drew Adams's message of "Fri, 6 Nov 2020 22:48:48 -0800 (PST)") 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:216895 Archived-At: tags 44500 + moreinfo thanks Drew Adams writes: > This variable was introduced in Emacs 25, apparently. > > I'm not happy that it's used/implemented the way it is, by default. I > have a function that calls `read-char' in a loop, and it took me a while > to figure out why this code broke starting with Emacs 25. That function > is called by a command bound to `P B', where `P' is a prefix key. > > I'm not sure why, based on the doc of the variable etc., but even though > `P B' is not itself a prefix key, the default value of the variable > interfered with the normal behavior in the echo area. After finding out > the cause, I now bind the var to nil in that part of my code. But this > variable shouldn't have the effect it has, IMO. > > Here's the function I use: > > (defun bmkp-bmenu-read-filter-input () [...] > > This code worked fine prior to Emacs 25. Starting with that release I > had to bind `prefix-command-echo-keystrokes-functions' to nil. I > shouldn't have had to do that. Could you provide a minimal example to reproduce the issue? > If I don't add that binding, then: > > You don't always even see the prompt "Pattern: ". Dunno why. > > Instead, you see `P-', then `P B-', as if `P B' were a prefix key (only > `P' is a prefix key), and each char you type is also echoed as if it > were part of a prefix key, i.e., it's followed by a hyphen. > > So if you type "red" after the (invisible) prompt, you see `P B r-', > then `P B r e-', then `P B r e d-'. You should instead see `Pattern: r', > then `Pattern: re', then `Pattern: red'. > > Binding the variable to nil fixes the problem. But this behavior is a > bug, IMO, and the introduction of the variable shouldn't have changed > the default echo-area behavior of Emacs. > > Hope the problem description is clear enough. > > 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=x86_64-w64-mingw32 > --without-compress-install 'CFLAGS=-O2 -static -g3''