From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: not quite understanding input methods Date: Mon, 30 Aug 2021 15:19:59 -0400 Message-ID: References: <231adc63-77f0-037a-365c-28db98f684cf@piermont.com> <7343dfd2-05d5-0752-8e43-cd44d6394963@piermont.com> <356c5a4b-92af-ae1c-a39a-f68586807be1@piermont.com> <390f5e5a-4952-5ccf-3d61-048e4049cd25@piermont.com> <838s0ikawo.fsf@gnu.org> <94711961-81b0-dc21-dca0-d92726a7428f@piermont.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5858"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: "Perry E. Metzger" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 30 21:22:06 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKmr7-0001Ef-3z for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Aug 2021 21:22:05 +0200 Original-Received: from localhost ([::1]:52348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKmr5-0005jF-HP for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Aug 2021 15:22:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKmpE-00044W-9I for emacs-devel@gnu.org; Mon, 30 Aug 2021 15:20:08 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:35484) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKmp9-0008Do-Ra; Mon, 30 Aug 2021 15:20:07 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0762780272; Mon, 30 Aug 2021 15:20:02 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B2F4F80547; Mon, 30 Aug 2021 15:20:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1630351200; bh=1fwej/BDJBHleC+9YYo0qi3vbIPJXs2wu8Ctw9oBLy0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=jbHC+1S7Q8tLOGTEOKwd/QzRBtWFqWRw9EI8d+rUZnj9O/vo6faA+jJYP7hqN+bKv Q3cLc+w0EPmbeskIYc/MO4k6wRhN5dNkY2uIkF7U2hIehIZO1WdpveweG/G+UM6NiO udPB1zUAKgxZxGJtjxbRXxwCqnP8pWVUiDjapSORDtUDt8G/bUD5jantm6xaElUAnh eHWQh8kO/nRgMC/0iQo9qOhlbUGDYTSXmkHwf6bFtOUtDfpexPh+0VPpInqj4vcjid jXrzaIxM7BXTG40/ITeJ81LCI+yGFyOFnnN999rzU+k3Kc89Rrrk5JHTEW/O2TuitF i1XHge1dPA62w== Original-Received: from alfajor (unknown [104.247.244.135]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 781F8120484; Mon, 30 Aug 2021 15:20:00 -0400 (EDT) In-Reply-To: <94711961-81b0-dc21-dca0-d92726a7428f@piermont.com> (Perry E. Metzger's message of "Mon, 30 Aug 2021 15:13:25 -0400") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:273540 Archived-At: > Yes, but the point at which the character that's inserted into the buffer is > present is after the Quail input method was invoked by read_char. Again, I'm > finding the stack of things involved in the input method getting invoked > rather difficult to follow, but it feels like Quail doesn't actually look > backwards in the buffer and thus could care less that I inserted > a particular character there. That said, I don't truly get how all this > works yet, there's no documentation and a heap of twisty code involved. There might be multiple obstacles involved (e.g. multiple places that assumes the chars are all <127), so it'll be important to test things bit by bit. E.g. check that with no patch the `input-method-function` is not called at all when you press F19, then check that with your patch `input-method-function` *is* called when you press F19. Once that is done, the rest of the hacking should all be doable at the Lisp level, but it may involve tracing through the quail code, indeed. Stefan