From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Disable text conversion in map-ynp Date: Mon, 06 May 2024 16:41:22 +0300 Message-ID: <86o79jawhp.fsf@gnu.org> References: <86pltzb0v0.fsf@gnu.org> <87pltz3y7b.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2157"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 06 15:42:10 2024 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 1s3yba-0000Nc-FM for ged-emacs-devel@m.gmane-mx.org; Mon, 06 May 2024 15:42:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3yb3-0003eI-5k; Mon, 06 May 2024 09:41:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3yb2-0003e7-31 for emacs-devel@gnu.org; Mon, 06 May 2024 09:41:36 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3yb1-0002sy-R4; Mon, 06 May 2024 09:41:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=zUp29ne75Yon0wzz1MyEemMssiBmNwa2pOdIyZr1DG8=; b=UPdWOIVzsBo+ 8oyM+c2lC4yGGMx06r/bHO0GwNgA+48FPiFoCQjCqTW8a4RDfQLhTx9o4nSEgAbIAxTUmhN73U7ga j16bHeBJh4nTlC4vF92O4b0ujTXO9bPN/Nc/cZbo86bLrTbq+J5qG0j4/WNYjjJY91XmqxclFy+kq JPvgZkAPslhWydOvB31WVsb3epS0fXcvx40KwvMuMm1k0rMHAbr6rgxkLd8kz5N5JfAUFZ7VLXCEx 8Idwzb+vjfabydl2AYKUBNfTALOgP35ywSe+tis06ddxPIeZ6w0LxxcUOSNWgSLNCOJTePjUh1xsB x7iQ8qLlnUGT1CwG84OLrg==; In-Reply-To: <87pltz3y7b.fsf@yahoo.com> (message from Po Lu on Mon, 06 May 2024 20:46:16 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:318892 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Mon, 06 May 2024 20:46:16 +0800 > > Eli Zaretskii writes: > > > I reverted the commit which replaced read-event with read-key in > > map-y-or-n-p. Bitter experience has taught us that such replacements > > cause trouble, so we should not make them without a thorough > > discussion, including a good understanding of the issues and the > > alternative solution. > > > > Feel free to continue this thread with an explanation of the problem, > > and why using read-key instead of read-event solves it. > > read-event is supposed to signal to GUI input methods that they should > not attempt to insert typed text directly into the current buffer, in > the process called text conversion. Some user reported that map-ynp was > not functional with read-key on Android and other systems where input > methods are installed, and that substituting read-event sufficed, though > read-key is meant to disable text conversion as well. (I had not the > time to verify either theory for myself but I've also never had any > occasion to doubt his feedback.) Thanks, but I don't think I understand the issue, given the above description. For starters, you changed read-event to read-key, not the other way around. So does it mean it's read-key that is supposed to prevent text conversion, while read-event does not? Also, read-event disables input methods if its 2nd argument is nil (which it is in this case) -- does this mean that fact does not affect the Android input methods? and if so, is there a way to suppress input methods on Android while still calling read-event? IOW, I'd like to keep using read-event, but make sure text-conversion doesn't happen, instead of switching to read-key. And if that's impossible for some reason, how about using read-key only on Android? In any case, I feel that we should have a better understanding of the underlying issues before we decide how to solve them.