From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [michael.cadilhac-@t-lrde.epita.fr: sit-for (detect_input_pending ?) and postfix input methods.] Date: Wed, 05 Oct 2005 13:42:40 -0400 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1128534423 1213 80.91.229.2 (5 Oct 2005 17:47:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Oct 2005 17:47:03 +0000 (UTC) Cc: michael.cadilhac-@t-lrde.epita.fr, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 05 19:47:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ENDIK-00047T-NP for ged-emacs-devel@m.gmane.org; Wed, 05 Oct 2005 19:43:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ENDIJ-0003Yu-Qa for ged-emacs-devel@m.gmane.org; Wed, 05 Oct 2005 13:43:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ENDHz-0003Yl-Li for emacs-devel@gnu.org; Wed, 05 Oct 2005 13:42:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ENDHz-0003YU-59 for emacs-devel@gnu.org; Wed, 05 Oct 2005 13:42:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ENDHz-0003YR-1v for emacs-devel@gnu.org; Wed, 05 Oct 2005 13:42:47 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ENDHy-0007ph-Ao; Wed, 05 Oct 2005 13:42:46 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 353752CF61A; Wed, 5 Oct 2005 13:42:45 -0400 (EDT) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 35D904AC00A; Wed, 5 Oct 2005 13:42:40 -0400 (EDT) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 24F4A5121; Wed, 5 Oct 2005 13:42:40 -0400 (EDT) Original-To: Kenichi Handa In-Reply-To: (Kenichi Handa's message of "Wed, 05 Oct 2005 16:26:35 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.848, requis 5, autolearn=not spam, AWL 0.05, BAYES_00 -4.90) X-MailScanner-From: monnier@iro.umontreal.ca 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:43582 Archived-At: > This is because sit-for instantly returns t if > unread-command-events is not nil, and the currrent input > method mechanism uses unread-command-events in the following > way: ...Hmmm... interesting. Indeed, what happens basically is that when you type a b the `a' is only executed when you type the `b', because in the time between the two events, quail is waiting for another key in order to decide whether to really meant to type an `a' or maybe some other char (like =E0, =E4, ...= ). In the case where `a' and `b' are bount to self-insert-command, I could imagine changing Quail such that the first (quail-input-method ?a) returns '(?a) and that a subsequent (quail-input-method ?\") returns '(?\^? ?=E4), with some added magic to add/remove the underscore. But since those chars can be bound to something else than self-insert-command, there's no guarantee that it'll do the right thing. Or maybe we should first return '(set-quail-undo-boundary ?a) and then '(quail-undo-last ?=E4) where both set-quail-undo-boundary and quail-undo-l= ast are special events bound to similarly named functions. I guess that could work, although it would need additional hacks to enable/disable the undo-log and to add/remove the underscore. Stefan