all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: emacs-devel@gnu.org, Qiantan Hong <qhong@mit.edu>,
	EMACS development team <emacs-devel@gnu.org>
Subject: Re: Behavior of input method -- crdt.el
Date: Sun, 18 Oct 2020 07:46:51 +0300	[thread overview]
Message-ID: <B3A2F666-1280-483B-AFB4-A093CB278F6F@gnu.org> (raw)
In-Reply-To: <EDBC4D89-1CE6-48A7-A96E-C1D0010BB4FD@mit.edu>

On October 18, 2020 6:47:44 AM GMT+03:00, Qiantan Hong <qhong@mit.edu> wrote:
> Hi,
> 
> I’m now working on the compatibility between 
> https://code.librehq.com/qhong/crdt.el
> <https://code.librehq.com/qhong/crdt.el> and Emacs input methods.
> There might be the case that one peer is in the halfway of input
> some characters using input method (it seems that at this state,
> there are some temporary text inserted in the buffer without calling
> *-change-functions), and some changes from other peer arrives.
> 
> After resolving the position of the changes, crdt.el move point
> to the resolved position and use INSERT to insert the characters
> from remote peer.
> In the case that these other changes happen to at exactly the same
> position that current user is inserting using input method, seems that
> the input method get confused and consider those inserted character
> as part of its halfway input. It doesn’t affect character selection,
> but
> when user finally select a character, it erase both the halfway input
> and the inserted remote characters. Now the peers are inconsistent.
> 
> Anyone have any idea on how to workaround this?

One simple solution is to avoid executing remote changes as long as quail-translating is non-nil, thus treating the entire input method insertion sequence as a single atomic transaction.



  reply	other threads:[~2020-10-18  4:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-18  3:47 Behavior of input method -- crdt.el Qiantan Hong
2020-10-18  4:46 ` Eli Zaretskii [this message]
2020-10-18 13:26 ` Stefan Monnier
2020-10-18 20:34   ` Qiantan Hong
2020-10-18 20:52     ` Stefan Monnier
2020-10-19  2:28       ` Eli Zaretskii
2020-10-19  2:48         ` Qiantan Hong
2020-10-19  3:07           ` Stefan Monnier
2020-10-19 14:29           ` Eli Zaretskii
2020-10-19 14:55             ` Qiantan Hong
2020-10-19 15:06               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B3A2F666-1280-483B-AFB4-A093CB278F6F@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=qhong@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.