From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Using quail input methods to translate buffer text. Date: Fri, 21 Jul 2006 11:50:24 +0900 Message-ID: References: <87k66rlqys.fsf@heslin.eclipse.co.uk> <87y7v5fvp2.fsf@dur.ac.uk> <8764i9caau.fsf@heslin.eclipse.co.uk> <87zmfkhqfm.fsf@catnip.gol.com> <87u05shq6q.fsf@catnip.gol.com> <87ac7hupt2.fsf@heslin.eclipse.co.uk> <87lkqob2fe.fsf@heslin.eclipse.co.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=ISO-2022-JP X-Trace: sea.gmane.org 1153450294 13065 80.91.229.2 (21 Jul 2006 02:51:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Jul 2006 02:51:34 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 21 04:51:32 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G3l6r-0003Mq-KF for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2006 04:51:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3l6r-0004Kb-25 for ged-emacs-devel@m.gmane.org; Thu, 20 Jul 2006 22:51:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G3l6e-0004K6-GT for emacs-devel@gnu.org; Thu, 20 Jul 2006 22:51:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G3l6d-0004JO-8L for emacs-devel@gnu.org; Thu, 20 Jul 2006 22:51:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3l6c-0004JK-Vm for emacs-devel@gnu.org; Thu, 20 Jul 2006 22:51:11 -0400 Original-Received: from [150.29.246.133] (helo=mx1.aist.go.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G3l6w-0007bL-CN for emacs-devel@gnu.org; Thu, 20 Jul 2006 22:51:30 -0400 Original-Received: from smtp2.aist.go.jp ([150.29.246.12]) by mx1.aist.go.jp with ESMTP id k6L2p53g010335; Fri, 21 Jul 2006 11:51:05 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp2.aist.go.jp with ESMTP id k6L2p42v009190; Fri, 21 Jul 2006 11:51:04 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 3.36 #1 (Debian)) id 1G3l5s-0000Z9-00; Fri, 21 Jul 2006 11:50:24 +0900 Original-To: Peter Heslin In-reply-to: <87lkqob2fe.fsf@heslin.eclipse.co.uk> (message from Peter Heslin on Thu, 20 Jul 2006 18:40:05 +0100) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) 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:57406 Archived-At: In article <87lkqob2fe.fsf@heslin.eclipse.co.uk>, Peter Heslin writes: >> It still doesn't work for chinese-py. For instance, typing >> "bei2" should input "北", but quail-conv doesn't handle the >> last "2" correctly. > Ah, thanks. I think I've fixed this bug, but I'm not sure my fix is > correct. I have assumed that each compound character sequence may be > followed by at most a single digit, and that this digit is used to > access the relevant vector like so: "1" gets the 0th element, "2" gets > the 1st ..., "9" gets the 8th, and "0" gets the 9th. Does that sound > right? > PY.el says: "(each group contains at most 10 characters)", which I take > to mean that the index number following each group is never more than a > single digit. Are there other input methods where this is not true? That's not accurate. See the variable quail-translation-keymap. A user can select the next/prev group by typing C-n/C-p. In addition, several input methods (including chinese-py) remembers the last selection. So, to get a constant result, we must reset the indices of last selected translation, which requires modifying contents of (quail-map). I think it's not worth working on quail-conv to make it work correctly for all cases. How about just make it work well for simple input methods (i.e. ones that (quail-simple) return t) and reject complicated input methods. --- Kenichi Handa handa@m17n.org