From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Using quail input methods to translate buffer text. Date: Sat, 08 Jul 2006 09:48:45 +0900 Message-ID: <87zmfkhqfm.fsf@catnip.gol.com> References: <87k66rlqys.fsf@heslin.eclipse.co.uk> <87y7v5fvp2.fsf@dur.ac.uk> <8764i9caau.fsf@heslin.eclipse.co.uk> Reply-To: Miles Bader NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1152319753 24476 80.91.229.2 (8 Jul 2006 00:49:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 Jul 2006 00:49:13 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 08 02:49:11 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 1Fz10P-0004Cz-PV for ged-emacs-devel@m.gmane.org; Sat, 08 Jul 2006 02:49:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fz10P-00055e-9H for ged-emacs-devel@m.gmane.org; Fri, 07 Jul 2006 20:49:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fz10B-00054W-Gq for emacs-devel@gnu.org; Fri, 07 Jul 2006 20:48:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fz108-000520-NX for emacs-devel@gnu.org; Fri, 07 Jul 2006 20:48:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fz108-00051i-I4 for emacs-devel@gnu.org; Fri, 07 Jul 2006 20:48:52 -0400 Original-Received: from [203.216.5.72] (helo=smtp02.dentaku.gol.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fz10e-0002r4-4Y; Fri, 07 Jul 2006 20:49:24 -0400 Original-Received: from 203-216-98-193.dsl.gol.ne.jp ([203.216.98.193] helo=catnip.gol.com) by smtp02.dentaku.gol.com with esmtpa (Dentaku) id 1Fz103-00080k-EJ; Sat, 08 Jul 2006 09:48:47 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 8518B2F66; Sat, 8 Jul 2006 09:48:45 +0900 (JST) Original-To: Peter Heslin System-Type: i686-pc-linux-gnu In-Reply-To: <8764i9caau.fsf@heslin.eclipse.co.uk> (Peter Heslin's message of "Fri, 07 Jul 2006 23:36:09 +0100") Original-Lines: 21 X-Abuse-Complaints: abuse@gol.com 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:56754 Archived-At: Peter Heslin writes: > OK, so I tried a different approach. I borrowed some lines of this code > from quail.el without fully understanding the data structures, so it may > be wrong, but it seems to work for my simple purposes. Are there any > problems with this approach? I tried both Kenichi's and your code using the `japanese' input method, and yours seems to simply not work at all -- or at least I can't see what it's doing: it simply returns nil (and doesn't insert anything in the buffer). It does seem to work using the input method `latin-1-postfix'. In both cases, it leaves an empty scratch window behind named "*conversion output*". Kenichi's code does work properly for both cases, though a bit oddly for Japanese -- because the japanese input method expects input to be terminated with RET, you must append a "\r" to the string you pass to his code to make sure it finishes correctly. -Miles -- Quidquid latine dictum sit, altum viditur.