Subject: bug#50865: 28.0.50; Emoji with emoji modifier in Linux console garbles emacs display

From: Eli Zaretskii <[email-masked]>
Date: Tue, 28 Sep 2021 20:21:25 +0300

> From: Aura Kelloniemi <[email-masked]>
> Cc: [email-masked]
> Date: Tue, 28 Sep 2021 19:54:29 +0300
> 
>  > If your terminal doesn't understand character composition, the best
>  > solution for you is to turn off auto-composition-mode when using Emacs
>  > on that terminal.  Please try that and tell if that resolves the issue
>  > for you: type "M-x auto-composition-mode RET" and make sure Emacs says
>  > that the mode is disabled.
> 
> Unfortunately it does not seem to do anything. The problem stays exactly as I
> described.

What is your terminal's encoding? what does the following show in the
echo-area?

  M-: (terminal-coding-system) RET

> For some reason, when I re-enable auto-composition-mode, the output appears
> correct (no extra spaces at the end of line) for a while, but if I start to
> add characters to the line containing the emojis, the display gets garbled
> again.

Does typing the below solve the problem?

  M-: (set-char-table-range char-width-table '(#x1f600 . #x1f64f) 1) RET

(You will need to redraw the display after evaluating it, e.g. with
"C-l" or "M-x redraw-display RET".)