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: Best way to intercept terminal escape sequences? Date: Sat, 28 Aug 2010 16:47:37 +0200 Message-ID: References: <20100827142724.E1DD712F@hazard.ece.cmu.edu> <4C77CF3C.6050406@ece.cmu.edu> <834oegm5c3.fsf@gnu.org> <4C78C0AF.5040502@ece.cmu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1283022229 9776 80.91.229.12 (28 Aug 2010 19:03:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 Aug 2010 19:03:49 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Ryan Johnson Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 28 21:03:47 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 1OpQgp-0005UT-06 for ged-emacs-devel@m.gmane.org; Sat, 28 Aug 2010 21:03:43 +0200 Original-Received: from localhost ([127.0.0.1]:44056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OpQgo-0002AC-H6 for ged-emacs-devel@m.gmane.org; Sat, 28 Aug 2010 15:03:42 -0400 Original-Received: from [140.186.70.92] (port=42809 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OpQgf-00028p-8L for emacs-devel@gnu.org; Sat, 28 Aug 2010 15:03:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OpQgd-0005yz-TK for emacs-devel@gnu.org; Sat, 28 Aug 2010 15:03:32 -0400 Original-Received: from drizzle.cc.mcgill.ca ([132.206.27.48]:50975) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OpQgd-0005yv-QM; Sat, 28 Aug 2010 15:03:31 -0400 Original-Received: from mailscan3.ncs.mcgill.ca (mailscan3.NCS.McGill.CA [132.216.77.250]) by drizzle.cc.mcgill.ca (8.12.11.20060308/8.12.3) with ESMTP id o7SJ3QYi019465; Sat, 28 Aug 2010 15:03:26 -0400 Original-Received: from mailscan3.ncs.mcgill.ca (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 88AE671C2; Sat, 28 Aug 2010 15:03:26 -0400 (EDT) Original-Received: from fmsmemgm.homelinux.net (vpn87207.VPN.McGill.CA [132.216.87.207]) by mailscan3.ncs.mcgill.ca (Postfix) with ESMTP id 21AC871AB; Sat, 28 Aug 2010 15:03:26 -0400 (EDT) Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id D33E0AE3C9; Sat, 28 Aug 2010 20:50:45 +0200 (CEST) In-Reply-To: <4C78C0AF.5040502@ece.cmu.edu> (Ryan Johnson's message of "Sat, 28 Aug 2010 09:54:23 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-PMX-Version: 5.4.2.338381, Antispam-Engine: 2.6.0.325393, Antispam-Data: 2010.6.9.160619 X-McGill-WhereFrom: Internal X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 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:129352 Archived-At: > That might make sense... the caller could always apply the coding system > manually before dumping things back in the unread-command-events queue. Or coding-system decoding should be applied to events from unread-command-events. > Who currently uses read-* that might be affected? xt-mouse.el would love it, > mouse.el certainly won't care, and other xterm processing will > be indifferent. As mentioned, read-event did not do obey keyboard-coding-system in earlier Emacsen, so any affected package is more likely to be fixed than broken by making a change that reverts to this previous behavior. > BTW, I've been playing with read-key and it's perfect for making mouse.el > and xt-mouse.el play nice together! I'm a tad unclear on the difference > between read-key and read-key-sequence, though, other than the latter > letting you supply a minibuffer prompt. read-key only reads a single event. I.e. only C-x not C-x C-a. This event might be the result of processing several raw events (e.g. via keyboard-coding-system, input-decode-map, ...). Stefan