From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.bugs Subject: bug#6883: 23.2; `read-key' echos keys in the minibuffer Date: Thu, 19 Aug 2010 16:20:38 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1282234123 24337 80.91.229.12 (19 Aug 2010 16:08:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Aug 2010 16:08:43 +0000 (UTC) Cc: thierry.volpiatto@gmail.com To: 6883@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 19 18:08:40 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Om7fP-0001MH-Uk for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Aug 2010 18:08:40 +0200 Original-Received: from localhost ([127.0.0.1]:45887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Om7fM-0005s8-3j for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Aug 2010 12:08:32 -0400 Original-Received: from [140.186.70.92] (port=41989 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Om7bY-00046k-U8 for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2010 12:04:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Om7Cn-0000d0-7r for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2010 11:39:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53759) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Om7Cn-0000cw-6U for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2010 11:39:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Om6uR-0007Ns-FD; Thu, 19 Aug 2010 11:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Aug 2010 15:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6883 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.128223118828373 (code B ref -1); Thu, 19 Aug 2010 15:20:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Aug 2010 15:19:48 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Om6u7-0007Na-15 for submit@debbugs.gnu.org; Thu, 19 Aug 2010 11:19:48 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Om6u5-0007NV-MT for submit@debbugs.gnu.org; Thu, 19 Aug 2010 11:19:42 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:57160) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Om6vA-0002u5-Q6 for submit@debbugs.gnu.org; Thu, 19 Aug 2010 11:20:48 -0400 Original-Received: from [140.186.70.92] (port=42573 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Om6v9-00076W-4U for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2010 11:20:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Om6v4-00066O-4l for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2010 11:20:47 -0400 Original-Received: from ppsw-31.csi.cam.ac.uk ([131.111.8.131]:49003) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Om6v3-000661-Rr for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2010 11:20:42 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Original-Received: from cpc1-cmbg13-0-0-cust596.5-4.cable.virginmedia.com ([86.9.122.85]:62382 helo=Victoria.local) by ppsw-31.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:587) with esmtpsa (PLAIN:sl392) (TLSv1:DHE-RSA-AES128-SHA:128) id 1Om6v2-0000AO-Jk (Exim 4.72) (return-path ); Thu, 19 Aug 2010 16:20:40 +0100 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 19 Aug 2010 11:20:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39632 Archived-At: 1. Define bookmark-read-search-input as this which inserts a (sit-for 1) to demonstrate the bug easily: (defun bookmark-read-search-input () (let ((prompt (propertize "Pattern: " 'face 'minibuffer-prompt)) (tmp-list ())) (while (let ((char (read-key (concat prompt bookmark-search-pattern)))) (sit-for 1) (case char ((?\e ?\r) nil) ; RET or ESC break the search loop. (?\C-g (setq bookmark-quit-flag t) nil) (?\d (pop tmp-list) t) ; Delete last char of pattern with DEL (t (if (characterp char) (push char tmp-list) (setq unread-command-events (nconc (mapcar 'identity (this-single-command-raw-keys)) unread-command-events)) nil)))) (setq bookmark-search-pattern (apply 'string (reverse tmp-list)))))) 2. and eval (let (bookmark-search-pattern) (bookmark-read-search-input)) 3. then start typing away. You should see each key is echoed. So for example if you hit backspace you may see backspace or DEL in the echo area twice. With the original definition back (ie without the sit-for) you can observe a trail for each key you type by for example doing something like this: 1. C-x r l to list bookmarks 2. M-g s and start typing away That breaks the smooth flow of key strokes. Thierry Volpiatto, YAMAMOTO Mitsuharu and I can observe this on all three major platforms. On some platforms, it happens so fast that it is hardly annoying, on others you can read the echoing literally. `read-char' does not have this problem and thus Thierry's suggestion to use it instead. Leo