all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Behavior of input method -- crdt.el
@ 2020-10-18  3:47 Qiantan Hong
  2020-10-18  4:46 ` Eli Zaretskii
  2020-10-18 13:26 ` Stefan Monnier
  0 siblings, 2 replies; 11+ messages in thread
From: Qiantan Hong @ 2020-10-18  3:47 UTC (permalink / raw)
  To: EMACS development team


[-- Attachment #1.1: Type: text/plain, Size: 1446 bytes --]

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?

To be more clear, a concrete example:

User1 is typing using chinese-py.
User1’s buffer: ce
User2’s buffer: 

User2 type a “t” at the begining
User1’s buffer: tce
User2’s buffer: t

User1 finish selection
User1’s buffer: 测
User2’s buffer: t测
Notice that the input method also erase t.

Now both user’s buffers are inconsistent.


Best,
Qiantan


[-- Attachment #1.2: Type: text/html, Size: 3317 bytes --]

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 1858 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-10-19 15:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-18  3:47 Behavior of input method -- crdt.el Qiantan Hong
2020-10-18  4:46 ` Eli Zaretskii
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

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.