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: Behavior of input method -- crdt.el Date: Mon, 19 Oct 2020 18:06:25 +0300 Message-ID: <83imb6p85q.fsf@gnu.org> References: <73AE53EF-1AE2-4860-9019-36DFA68D27AB@mit.edu> <831rhvq78u.fsf@gnu.org> <83v9f6p9ut.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27786"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Qiantan Hong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 19 17:08:38 2020 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 1kUWm5-00074m-Sw for ged-emacs-devel@m.gmane-mx.org; Mon, 19 Oct 2020 17:08:37 +0200 Original-Received: from localhost ([::1]:42470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUWm4-00027n-TQ for ged-emacs-devel@m.gmane-mx.org; Mon, 19 Oct 2020 11:08:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUWk8-0000yn-Fv for emacs-devel@gnu.org; Mon, 19 Oct 2020 11:06:37 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35570) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUWjz-0001pc-A0; Mon, 19 Oct 2020 11:06:34 -0400 Original-Received: from [176.228.60.248] (port=2692 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kUWju-0002CO-Su; Mon, 19 Oct 2020 11:06:25 -0400 In-Reply-To: (message from Qiantan Hong on Mon, 19 Oct 2020 14:55:31 +0000) 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:258123 Archived-At: > From: Qiantan Hong > CC: Stefan Monnier , > "emacs-devel@gnu.org" > > Date: Mon, 19 Oct 2020 14:55:31 +0000 > > > This isn't limited to input methods, btw: did you try typing several > > characters that are composed together on display into a single > > grapheme cluster (under auto-composition-mode)? what happens if remote > > command arrives in the middle of this sequence and moves point? > Is there variable to detect such usage like “quail-translating”? No. But is there a problem? > > We are talking about Leim input methods, not about the input methods > > your OS supports. Do such long sequences that produce entire phrases > > happen in our input methods? If so, can you show an example? > There are input methods written by users using Quail framework. > E.g. https://melpa.org/#/pyim Can you help me with an example of a long sequence that produces an entire phrase with that input method? > > Do we have to employ hacks? Quail input methods tell you when they > > don't expect to be interrupted, by setting quail-translating to a > > non-nil value; why not use that indication to handle this issue in a > > non-hackish way? > For quail input method, remote command will never interrupt the > sequence themselves. Because crdt.el doesn’t assign CRDT IDs > to those pending text, remote change will never resolve in the middle > of such sequence. They are not synchronized to other peers either. > It follows exact the conceptual model “text pending translation > are not in the buffer yet, they’re just displayed there”. They don’t > need to lock the buffer either. I'm not sure I understand: are you saying that the problem with receiving remote commands in the middle of a Leim input sequence doesn't exist? If so, what was the situation about which you asked the question that started this thread?