From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#1003: 23.0.60; set-keyboard-coding-system incompatible with TeX input method Date: Mon, 25 May 2009 13:44:12 +0900 Message-ID: Reply-To: Kenichi Handa , 1003@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1243228215 1295 80.91.229.12 (25 May 2009 05:10:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 May 2009 05:10:15 +0000 (UTC) Cc: lconrad@laymusic.org, 1003@emacsbugs.donarmstrong.com To: monnier@iro.umontreal.ca Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 25 07:10:07 2009 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 1M8SRp-0001Y2-7a for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 May 2009 07:10:05 +0200 Original-Received: from localhost ([127.0.0.1]:54509 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8SRo-0004S3-L5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 May 2009 01:10:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M8SR7-0003wz-9Z for bug-gnu-emacs@gnu.org; Mon, 25 May 2009 01:09:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M8SR2-0003w3-52 for bug-gnu-emacs@gnu.org; Mon, 25 May 2009 01:09:20 -0400 Original-Received: from [199.232.76.173] (port=35468 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8SR2-0003w0-2W for bug-gnu-emacs@gnu.org; Mon, 25 May 2009 01:09:16 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:54742) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M8SR1-0004V0-Bl for bug-gnu-emacs@gnu.org; Mon, 25 May 2009 01:09:15 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4P59BTB016962; Sun, 24 May 2009 22:09:13 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n4P4o4EU012956; Sun, 24 May 2009 21:50:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kenichi Handa Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 25 May 2009 04:50:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 1003 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1003-submit@emacsbugs.donarmstrong.com id=B1003.124322663612084 (code B ref 1003); Mon, 25 May 2009 04:50:04 +0000 Original-Received: (at 1003) by emacsbugs.donarmstrong.com; 25 May 2009 04:43:56 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4P4hodH012069 for <1003@emacsbugs.donarmstrong.com>; Sun, 24 May 2009 21:43:51 -0700 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n4P4hl0d022960; Mon, 25 May 2009 13:43:47 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n4P4hlEC004696; Mon, 25 May 2009 13:43:47 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id n4P4hlU8005792; Mon, 25 May 2009 13:43:47 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1M8S2m-00062o-Sf; Mon, 25 May 2009 13:44:12 +0900 X-MIME-Autoconverted: from 8bit to quoted-printable by rzlab.ucr.edu id n4P59BTB016962 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 25 May 2009 01:09:20 -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:28134 Archived-At: I've just noticed that this bug is not yet closed. Laura Conrad wrote: > in TeX input mode, I expect to be able to type =C3=A9nt by typing "\'e= nt". > When I set: >=20 > (set-keyboard-coding-system 'utf-8) >=20 > typing those four characters gives me some Chinese character. >=20 > This is with the ubuntu Linux 8.04 emacs-snapshot package. It seems that this bug is now fixed by Stefan's workaround patch accompanied with this comment: ;; Invalid utf-8 sequence. Might be because Quail got involved ;; in-between and the bytes we thought we were reading were actua= lly ;; latin-1 chars. Let's presume that `event' is the second "byte= ", ;; i.e. there weren't any "apprently correct" between `lead' and ;; `event': it's easy to recover in this case, and the more gener= al ;; case seems pretty unlikely. ;; FIXME: We should really do encoded-kbd decoding before process= ing ;; input-methods. The strange thing is that the date of the orignal bug report is 2008-09-19 but the above patch was installed on 2008-06-15. Laura, do you still see the problem? Stefan Monnier wrote: > 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. I vaguely remember that I sent a patch to do that long ago, but it seems that the discussion fizzled out without reaching any conclusion. > Maybe another way to fix the problem is to let quail emit not just =C3=A9= but > the sequence [im-char =C3=A9] and then have input-decode-map strip the > `im-char' pseudo event; this would protect those im-generated chars fro= m > being processed by the keyboard-coding-system processing. That's one idea, but seems tricky. I prefer the first method. --- Kenichi Handa handa@m17n.org