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 13:37:43 -0400 Message-ID: References: <231adc63-77f0-037a-365c-28db98f684cf@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="20286"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 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 19:40:00 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 1mKlGI-00052C-VX for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Aug 2021 19:39:59 +0200 Original-Received: from localhost ([::1]:57912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKlGG-0005K1-WF for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Aug 2021 13:39:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKlEM-0004XI-UJ for emacs-devel@gnu.org; Mon, 30 Aug 2021 13:37:59 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54560) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKlEK-00082Y-0N for emacs-devel@gnu.org; Mon, 30 Aug 2021 13:37:57 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 4868F80904; Mon, 30 Aug 2021 13:37:53 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 8EE4080547; Mon, 30 Aug 2021 13:37:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1630345071; bh=ssbjjwk/74JYmKTBM0VijY2dAIbKT3H15tM2beOX2MU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=O2JXJkQ4selggGsWQcwJcE8OD/w/dpOHDHlBtVBNAz/sxZiMGHj5x751pxtvFO8uc mxZ1QRXB3wLqJ/YzL+Hwguh247Z2CMD19lsjzsQWL2CqkUIqBL30x5FyEMv7WVYMDq XecWK3DfMriyT9MDCEeZGARlQ6ypJyAa3oEKteDs2rnYVZiobVDjUdJ1SeOLA2v6y6 sxVepeu1kyPkowI55W0Bp7Kv4zozaMzcUvt7Bi411/3oE19KI0qT/vvpXoTDoITut5 yWmQczmMFCWufhEL6t/1wTNeEHMcZ7cV2OrrJR79EH0s7pLQqDtI5mMY0jHVN/Niiz Gda4iqE7CSueg== Original-Received: from alfajor (unknown [104.247.244.135]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6A836120314; Mon, 30 Aug 2021 13:37:51 -0400 (EDT) In-Reply-To: <231adc63-77f0-037a-365c-28db98f684cf@piermont.com> (Perry E. Metzger's message of "Mon, 30 Aug 2021 13:24:27 -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:273518 Archived-At: > My guess is that something in the belly of Quail is reading events and not > the characters in the buffer, but as there's no documentation I'm not really > clear on what is going on. This is a hard-coded limit in the C code side of input-methods, as seen in src/keyboard.c (line 3117): /* Pass this to the input method, if appropriate. */ if (FIXNUMP (c) && ! NILP (Vinput_method_function) /* Don't run the input method within a key sequence, after the first event of the key sequence. */ && NILP (prev_event) && ' ' <= XFIXNUM (c) && XFIXNUM (c) < 256 && XFIXNUM (c) != 127) { It's already been requested to lift this restriction in the (fairly distant) past. IIRC there's no technical reason behind this limit, it reflects an assumption that non-ASCII chars have presumably already gone through some (other) form of input method. I think it would be good to lift this restriction, tho we probably want to do it progressively, e.g. by first introducing a var that controls it (so you could lift the restriction without potentially impact everyone else). Stefan