From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: read-char doesn't use input-decode-map Date: Wed, 30 Dec 2009 21:51:04 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1262228074 5307 80.91.229.12 (31 Dec 2009 02:54:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Dec 2009 02:54:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Rob Giardina Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 31 03:54:27 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NQBBD-0004aP-A9 for ged-emacs-devel@m.gmane.org; Thu, 31 Dec 2009 03:54:27 +0100 Original-Received: from localhost ([127.0.0.1]:45989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQBBD-0008Lk-SB for ged-emacs-devel@m.gmane.org; Wed, 30 Dec 2009 21:54:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQBB9-0008Lf-LX for emacs-devel@gnu.org; Wed, 30 Dec 2009 21:54:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQBB5-0008L9-S9 for emacs-devel@gnu.org; Wed, 30 Dec 2009 21:54:23 -0500 Original-Received: from [199.232.76.173] (port=37337 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQBB5-0008L6-PV for emacs-devel@gnu.org; Wed, 30 Dec 2009 21:54:19 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:32885) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NQBB5-0001Ot-GG for emacs-devel@gnu.org; Wed, 30 Dec 2009 21:54:19 -0500 Original-Received: from alfajor.home (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id nBV2sEIc014867; Wed, 30 Dec 2009 21:54:16 -0500 Original-Received: by alfajor.home (Postfix, from userid 20848) id B770C64370; Wed, 30 Dec 2009 21:51:04 -0500 (EST) In-Reply-To: (Rob Giardina's message of "Wed, 30 Dec 2009 19:56:14 +0000 (UTC)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3438=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:119100 Archived-At: > Wow, read-key is pretty wild. I didn't realize you could do that > with idle timers. Perhaps that's vanilla if you're used to > emacs' event handling :) It's definitely not vanilla: it took me a while to find something that worked OK, and even the current solution is pretty hackish since it relies on time to detect "key press boundaries", which is fundamentally unreliable. Sadly, I think there is fundamentally no reliable way to solve this problem, so it's probably about as good as it gets. > This apparently means that code like I attached has no way to > reliably translate all of a certain key into another key, at > least for existing code that uses read-char. For example, > y-or-n-p. Using read-char makes it pretty much hopeless, yes. Most uses of reac-char should be replaced by read-key instead. Stefan