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: Improve input handling documentation Date: Wed, 08 Sep 2010 11:11:07 +0200 Message-ID: References: <20100904160740.988082D5@osgood.ece.cmu.edu> <4C82987A.4060300@ece.cmu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1283937089 30847 80.91.229.12 (8 Sep 2010 09:11:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Sep 2010 09:11:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ryan Johnson Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 08 11:11:27 2010 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.69) (envelope-from ) id 1OtGgd-0002ny-CD for ged-emacs-devel@m.gmane.org; Wed, 08 Sep 2010 11:11:23 +0200 Original-Received: from localhost ([127.0.0.1]:43437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtGgc-0007YK-NS for ged-emacs-devel@m.gmane.org; Wed, 08 Sep 2010 05:11:22 -0400 Original-Received: from [140.186.70.92] (port=45230 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtGgS-0007Wi-UY for emacs-devel@gnu.org; Wed, 08 Sep 2010 05:11:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtGgQ-0001pF-QS for emacs-devel@gnu.org; Wed, 08 Sep 2010 05:11:11 -0400 Original-Received: from impaqm2.telefonica.net ([213.4.138.2]:52802) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtGgQ-0001oi-Jh for emacs-devel@gnu.org; Wed, 08 Sep 2010 05:11:10 -0400 Original-Received: from IMPmailhost5.adm.correo ([10.20.102.126]) by IMPaqm2.telefonica.net with bizsmtp id 48ZJ1f00E2jdgqJ3M9B9K5; Wed, 08 Sep 2010 11:11:09 +0200 Original-Received: from ceviche.home ([83.61.36.43]) by IMPmailhost5.adm.correo with BIZ IMP id 49B71f00Y0vquEj1l9B8Nt; Wed, 08 Sep 2010 11:11:09 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id CE8D9660D2; Wed, 8 Sep 2010 11:11:07 +0200 (CEST) In-Reply-To: <4C82987A.4060300@ece.cmu.edu> (Ryan Johnson's message of "Sat, 04 Sep 2010 21:05:30 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.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:129774 Archived-At: > Meanwhile, here's what I have inferred, roughly, about input handling. > Hopefully those familiar with emacs' guts can correct and improve it: > <-------- keyboard input > keyboard-coding-system > <-------- unread-input-method-events > [Input Method (optional, printable ascii chars only)] > <-------- unread-post-input-method-events > ??? > <-------- non-keyboard (e.g. mouse) events > <-------- unread-command-events (and unread-command-char) --------> read-char, read-event > input-decode-map > key-translation-map > [local-]function-key-map --------> read-key > assorted keymaps (global, local, minor mode, emulation, char/text > properties, overriding) --------> read-key-sequence > ??? > read-number, read-string, etc. (???) That looks pretty good and would be a good addition. One error: key-translation-map comes after [local-]function-key-map. BTW: is there a good reason why C-x 8 is on key-translation-map rather than in input-decode-map, function-key-map, or even global-map? > NOTE: the description of read-key and input-decode-map makes it sound like > read-event comes before coding systems, but empirically this is not true. input-decode-map doesn't decode coding-systems but things like escape sequences. Stefan "who wants to obsolete key-translation-map"