From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Handa Kenichi Newsgroups: gmane.emacs.bugs Subject: bug#8522: Arrow key trouble when keyboard encoding is euc-japan Date: Sat, 20 Jul 2013 08:29:39 -0400 Message-ID: References: <4DADA451.7080809@dennougedougakkai-ndd.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1374323409 30715 80.91.229.3 (20 Jul 2013 12:30:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Jul 2013 12:30:09 +0000 (UTC) Cc: 8522@debbugs.gnu.org, delmonta@dennougedougakkai-ndd.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 20 14:30:11 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V0WId-0003MD-63 for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Jul 2013 14:30:11 +0200 Original-Received: from localhost ([::1]:44204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0WIc-0004hQ-IW for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Jul 2013 08:30:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0WIY-0004cA-Pu for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2013 08:30:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V0WIX-00085s-PD for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2013 08:30:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0WIX-00085N-M8 for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2013 08:30:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V0WIV-0007vY-Sw for bug-gnu-emacs@gnu.org; Sat, 20 Jul 2013 08:30:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Handa Kenichi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Jul 2013 12:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8522 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 8522-submit@debbugs.gnu.org id=B8522.137432338630417 (code B ref 8522); Sat, 20 Jul 2013 12:30:03 +0000 Original-Received: (at 8522) by debbugs.gnu.org; 20 Jul 2013 12:29:46 +0000 Original-Received: from localhost ([127.0.0.1]:39190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V0WIB-0007uT-Ee for submit@debbugs.gnu.org; Sat, 20 Jul 2013 08:29:45 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:34884 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V0WI8-0007uL-S0 for 8522@debbugs.gnu.org; Sat, 20 Jul 2013 08:29:41 -0400 Original-Received: from handa by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1V0WI7-0007Hd-83; Sat, 20 Jul 2013 08:29:39 -0400 In-Reply-To: <70ppui8gr4.fsf@fencepost.gnu.org> (message from Glenn Morris on Tue, 16 Jul 2013 15:08:31 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76525 Archived-At: In article <70ppui8gr4.fsf@fencepost.gnu.org>, Glenn Morris writes: > Please could you take a look at this report? > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8522 I've just installed a little bit different fix. > IIJIMA Hiromitsu wrote: [...] > > According to the following site (in Japanese), > > http://slashdot.jp/~doda/journal/516198 > > the cause of this trouble is that arrow keys are passed to Emacs as > > ESC O {A,B,C,D} sequence and this "ESC O" is interpreted as ISO/IEC > > 2022's SS3 (single-shift 3) code. > > > > This trouble occurs when the following conditions are all met: > > - ISO/IEC 2022 compliant or their variants > > - Using SS3 > > - A character set designated to G3 by default > > > > At this moment, only Japanese EUC and its variants match the > > conditions. > > > > There are some encodings that use single-shifts: iso-2022-jp-2, > > iso-2022-cn, and iso-2022-cn-ext. But > > > > - iso-2022-jp-2 and iso-2022-cn use SS2 and do not use SS3, > > and > > - iso-2022-cn-ext uses SS3 but in this encoding G3 is empty > > at the boot time. > > > > In addition, iso-2022-cn-ext is a 7-bit encoding and therefore you > > can > > assume that in a 8-bit encoding, namely only Japanese EUC and its > > variants, a SS3 is followed by GR byte sequence, and treat the > > sequence > > "SS3 + GL-byte" as a void character. That analysis is correct. But, as ISO 2022 has a concept of "implementation level" which specifies which graphic plane (GL or GR) is indentified as the single-shift area, I introduced a new flag `8-bit-level-4' for ISO-2022 base coding system. By default, that flag is not set, thus the implementation level of the 2022 decoder is "4A" which means GR is identified as the single-shift area. So, the cursor key sequences ESC O A, etc are not recognized as a valid single-shift sequence, and thus those sequences are given to the normal key-sequence look-up mechanism. --- Kenichi Handa handa@gnu.org