From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#22714: 25.0.91; Minibuffer quirk in C-x r SPC Date: Sat, 20 Feb 2016 15:32:33 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456000415 22657 80.91.229.3 (20 Feb 2016 20:33:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Feb 2016 20:33:35 +0000 (UTC) Cc: 22714@debbugs.gnu.org To: Kaushal Modi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 20 21:33:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aXEDH-0002DT-Um for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Feb 2016 21:33:12 +0100 Original-Received: from localhost ([::1]:35470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXEDH-0002nH-Ar for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Feb 2016 15:33:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXEDD-0002l8-9Q for bug-gnu-emacs@gnu.org; Sat, 20 Feb 2016 15:33:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXED8-0002a1-8K for bug-gnu-emacs@gnu.org; Sat, 20 Feb 2016 15:33:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXED8-0002Zu-4q for bug-gnu-emacs@gnu.org; Sat, 20 Feb 2016 15:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aXED7-0007bt-S2 for bug-gnu-emacs@gnu.org; Sat, 20 Feb 2016 15:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Feb 2016 20:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22714 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22714-submit@debbugs.gnu.org id=B22714.145600036429232 (code B ref 22714); Sat, 20 Feb 2016 20:33:01 +0000 Original-Received: (at 22714) by debbugs.gnu.org; 20 Feb 2016 20:32:44 +0000 Original-Received: from localhost ([127.0.0.1]:35603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXECq-0007bQ-Ej for submit@debbugs.gnu.org; Sat, 20 Feb 2016 15:32:44 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:54154) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXECo-0007bA-Gt for 22714@debbugs.gnu.org; Sat, 20 Feb 2016 15:32:43 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AvEwA731xV/+OhCkxcgxCEAoVVuzcJhH6CTQQCAoE8ORQBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQgCAR+LOoUFB4QtBYwwkmeGaY0/gUUjYYM1IIJ4AQEB X-IPAS-Result: A0AvEwA731xV/+OhCkxcgxCEAoVVuzcJhH6CTQQCAoE8ORQBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQgCAR+LOoUFB4QtBYwwkmeGaY0/gUUjYYM1IIJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="193750206" Original-Received: from 76-10-161-227.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([76.10.161.227]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Feb 2016 15:32:35 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 072F8AE8A3; Sat, 20 Feb 2016 15:32:34 -0500 (EST) In-Reply-To: (Kaushal Modi's message of "Wed, 17 Feb 2016 09:07:55 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:113377 Archived-At: > Stefan should be able to comment more on why that changes the behavior of > the prompt staying vs disappearing. Good question. `read-key' uses `read-key-sequence' internally, and this function has always left the prompt on display. Maybe read-key should be changed to behave more like read-event (and read-char), since it's typically used in the same kinds of situations. IOW, we should probably install one of the two patches below. Stefan diff --git a/lisp/subr.el b/lisp/subr.el index 7478595..cd1b945 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2116,6 +2116,10 @@ some sort of escape sequence, the ambiguity is resolved via `read-key-delay'." (aref keys 1) key))) (cancel-timer timer) + ;; For some reason, `read-key(-sequence)' leaves the prompt in the echo + ;; area, whereas `read-event' seems to empty it just before returning + ;; (bug#22714). So, let's mimick the behavior of `read-event'. + (message nil) (use-global-map old-global-map)))) (defun read-char (&optional prompt) ;; (inherit-input-method seconds) diff --git a/lisp/register.el b/lisp/register.el index faed49a..5fab2b0 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -164,6 +164,13 @@ display such a window regardless." help-chars) (unless (get-buffer-window buffer) (register-preview buffer 'show-empty))) + ;; FIXME: For some reason, `read-key(-sequence)' leaves the prompt in + ;; the echo area, contrary to `read-event' which seems to empty it + ;; just before returning (bug#22714). + ;; Not sure what's the best fix: maybe read-key should be changed to + ;; behave like read-event. But in the mean time, the hack below + ;; should work. + (message nil) (if (characterp last-input-event) last-input-event (error "Non-character input-event"))) (and (timerp timer) (cancel-timer timer))