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#1003: 23.0.60; set-keyboard-coding-system incompatible with TeX input method Date: Sat, 20 Sep 2008 16:45:41 -0400 Message-ID: References: <20080919161117.DE08EE3CD9A@clavichord> Reply-To: Stefan Monnier , 1003@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1221944878 27412 80.91.229.12 (20 Sep 2008 21:07:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Sep 2008 21:07:58 +0000 (UTC) Cc: 1003@emacsbugs.donarmstrong.com To: lconrad@laymusic.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 20 23:08:55 2008 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.50) id 1Kh9hA-0000of-8l for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Sep 2008 23:08:48 +0200 Original-Received: from localhost ([127.0.0.1]:34105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kh9g8-0003eR-K2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Sep 2008 17:07:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kh9g5-0003df-LC for bug-gnu-emacs@gnu.org; Sat, 20 Sep 2008 17:07:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kh9g3-0003dT-4Z for bug-gnu-emacs@gnu.org; Sat, 20 Sep 2008 17:07:40 -0400 Original-Received: from [199.232.76.173] (port=60127 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kh9g2-0003d9-VX for bug-gnu-emacs@gnu.org; Sat, 20 Sep 2008 17:07:39 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:42713) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kh9g2-0001W3-6L for bug-gnu-emacs@gnu.org; Sat, 20 Sep 2008 17:07:38 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8KL7Zuq032526; Sat, 20 Sep 2008 14:07:36 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8KKt4bj027030; Sat, 20 Sep 2008 13:55:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 20 Sep 2008 20:55:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1003 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1003-submit@emacsbugs.donarmstrong.com id=B1003.122194355324712 (code B ref 1003); Sat, 20 Sep 2008 20:55:04 +0000 Original-Received: (at 1003) by emacsbugs.donarmstrong.com; 20 Sep 2008 20:45:53 +0000 Original-Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8KKjlVI024706 for <1003@emacsbugs.donarmstrong.com>; Sat, 20 Sep 2008 13:45:51 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiMFACL+1EjO+KDT/2dsb2JhbACBXbQ4gWWBAw X-IronPort-AV: E=Sophos;i="4.32,438,1217822400"; d="scan'208";a="27157951" Original-Received: from 206-248-160-211.dsl.teksavvy.com (HELO ceviche.home) ([206.248.160.211]) by ironport2-out.teksavvy.com with ESMTP; 20 Sep 2008 16:45:42 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id EA6FAB40B1; Sat, 20 Sep 2008 16:45:41 -0400 (EDT) In-Reply-To: <20080919161117.DE08EE3CD9A@clavichord> (Laura Conrad's message of "Fri, 19 Sep 2008 12:11:17 -0400 (EDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 20 Sep 2008 17:07:40 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:20677 Archived-At: > in TeX input mode, I expect to be able to type =E9nt by typing "\'ent". > When I set: > (set-keyboard-coding-system 'utf-8) > typing those four characters gives me some Chinese character. IIUC the problem is that the input method processing is done before the keyboard-coding-system processing. So the sequence "\ ' e n t" is turned by the input method into "=E9 n t" (i.e. 233 110 116) which is then interpreted as a utf-8 sequence which happens to give you a chinese character. In Emacs-22, bytes such as 233 were different from any other char, so such confusion wasn't possible, which worked around the underlying ordering problem. A real fix would probably be to perform keyboard-coding-system decoding earlier, but it's a non trivial change which may introduce its own set of problems. Maybe another way to fix the problem is to let quail emit not just =E9 but the sequence [im-char =E9] and then have input-decode-map strip the `im-char' pseudo event; this would protect those im-generated chars from being processed by the keyboard-coding-system processing. Handa? Stefan