all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Qiantan Hong <qhong@mit.edu>
Cc: Eli Zaretskii <eliz@gnu.org>,
	EMACS development team <emacs-devel@gnu.org>
Subject: Re: Behavior of input method -- crdt.el
Date: Sun, 18 Oct 2020 23:07:49 -0400	[thread overview]
Message-ID: <jwvft6akji9.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <B4FBADDD-22D5-4BA6-BDBF-C9EB6BBBED05@mit.edu> (Qiantan Hong's message of "Mon, 19 Oct 2020 02:48:45 +0000")

> I’ve done it with my hack (push forward the overlay input method
> uses) and it doesn’t block remote changes. It works with the
> builtin Chinese input method, and also a few external package I’ve
> tested. I don’t know if there's any problem with this approach.

I don't see anything wrong with the approach you're following.
It is disappointing that you'd need a special case for input methods.
I consider that as a "wart" which we'd like to be able to fix.
Maybe a good fix is to arrange for some kind of "protocol" that the
input method could use but that doesn't hard-code a dependency on the
input-method (i.e. a protocol that could be used by other packages
which may also want to modify the buffer temporarily while postponing
running the *-change-functions).

>> Hmm... That's clearly a problem.  I can imagine some reasons why we do
>> that, but I'm not sure they're good enough.  This probably deserves
>> a `M-x report-emacs-bug`.
> I don’t know, will it cause more problem if the input method
> actually trigger *-change-functions during halfway input?
> At least for my use case, that means the halfway input sequence
> is also synchronized to other peers and that doesn’t make much
> sense

I can't see any reason why it "doesn't make much sense".
I think it makes as much sense as any other "intermediate state" you
might go through while modifying some text.

> I think maybe the “correct” way is to display input sequence not
> as text in the buffer (conceptually they aren’t yet).

That's also a valid way to look at it, yes.


        Stefan




  reply	other threads:[~2020-10-19  3:07 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
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 [this message]
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=jwvft6akji9.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=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.