From: Qiantan Hong <qhong@mit.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: EMACS development team <emacs-devel@gnu.org>
Subject: Re: Behavior of input method -- crdt.el
Date: Sun, 18 Oct 2020 20:34:48 +0000 [thread overview]
Message-ID: <73AE53EF-1AE2-4860-9019-36DFA68D27AB@mit.edu> (raw)
In-Reply-To: <jwvmu0jn00q.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 916 bytes --]
>
>> Now the peers are inconsistent.
>
> Why? Why isn't the exact same erroneous erase+insert propagated to the
> other peers?
No, it seems that the input method secretly change buffer text
without calling *-change-functions.
I’ve figured a hack already, that still allows real time remote changes
to apply.
The input method is using an overlay
to mark “characters pending translation” and I just need to push
the overlay forward. Surprisingly, "secretly change buffer text
without calling *-change-functions” itself is not a problem because
I store CRDT-ID in buffer itself, so I just need to skip them during
ID search. It *will* be a problem, I imagine, if CRDT is implemented
as a separate library because it will shift all the buffer position after
that! In that case the only solution will be to block remote edit during
using input method — which make it not very real time.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 1858 bytes --]
next prev parent reply other threads:[~2020-10-18 20:34 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
2020-10-18 13:26 ` Stefan Monnier
2020-10-18 20:34 ` Qiantan Hong [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=73AE53EF-1AE2-4860-9019-36DFA68D27AB@mit.edu \
--to=qhong@mit.edu \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).