Re: [PATCH] emoji on TUI emacs

Stefan Monnier <[email protected]> Sun, 02 Aug 2026 13:25:07 -0400
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
> "A Lisp-exposed database" made me think you have in mind a data
> structure that users should manage "by hand".

I intended it to be manageable by hand for people who understand
compositions, yes.

>> I was hoping we can provide a command that takes care of those details.
>> E.g. a command that asks the user to put the cursor on the "last position
>> that's still displayed at the right place" (LKGP), then move the cursor by one
>> (composed) position and ask the user what they see, then do a tentative
>> update of the database, ask again the user what they see, ...
>> 
>> Or insert a line of ASCII the text above the LKGP and ask the user which
>> char in the line is immediately above position N (a position shortly
>> after the LKGP) in order to guess what to add to the database.
>
> Sounds like a tedious UI to me.

Yeah, I'm just throwing ideas out there.  Others would be for a command
that looks for likely culprits (funny chars with compositions), then
adds rules for them and asks the user if the result is worse/better.

Ideally, the UI would be clever enough to teach the users about the
underlying problem so that they may overtime learn to use a more direct
approach (such as changing the database by hand).

> This discussion seems to point out easier solutions, at least in a
> majority of cases.

I don't intend to discourage those other avenues.

>> >> Maybe also allow a more fine-grained control of auto-composition so it
>> >> can be enabled for some compositions (which the user thinks work
>> >> correctly, maybe with the help of the above manually-updated database) and
>> >> disabled for others (which the user hasn't encountered yet or doesn't
>> >> care to make work)?
>> > This is not workable, IMO, because we have no way of telling the
>> > terminal whether to compose or not to compose a given sequence of
>> > codepoints.  We can perhaps tell that to Emacs, but the terminal will
>> > do its thing regardless.
>> Then how come disabling auto-composition "works"?
> It causes Emacs assumptions be correct in many more cases than the
> other state.  Especially with Emoji sequences.

But I can't see why those assumptions can't be changed on
a composition-by-composition (or classes of compositions) basis rather
than with a global flag.


=== Stefan