From: Eli Zaretskii <eliz@gnu.org>
To: Aura Kelloniemi <kaura.dev@sange.fi>
Cc: 50865@debbugs.gnu.org
Subject: bug#50865: 28.0.50; Emoji with emoji modifier in Linux console garbles emacs display
Date: Tue, 28 Sep 2021 21:35:08 +0300 [thread overview]
Message-ID: <8335pok0pv.fsf@gnu.org> (raw)
In-Reply-To: <87fsto8unj.fsf@sange.fi> (message from Aura Kelloniemi on Tue, 28 Sep 2021 20:41:36 +0300)
> From: Aura Kelloniemi <kaura.dev@sange.fi>
> Cc: 50865@debbugs.gnu.org
> Date: Tue, 28 Sep 2021 20:41:36 +0300
>
> utf-8-unix
>
> And the Linux console is properly in Unicode mode. (Which means Unicode as it
> was understood in 2002 or so.)
Which could be too long ago? Are you saying that the Linux terminal
doesn't understand Unicode beyond the year 2002? That could explain a
lot.
> > Does typing the below solve the problem?
>
> > M-: (set-char-table-range char-width-table '(#x1f600 . #x1f64f) 1) RET
>
> No, not alone, but when I tried
>
> (set-char-table-range char-width-table '(#x1f300 . #x1f64f) 1)
>
> the problem is gone. Using the same trick to force some other characters (e.g.
> TIMER CLOCK) to width 1, I was able to get rid of the other problem that I
> mentioned, but could not track.
So it sounds like your terminal cannot handle double-width
characters. Those "space characters" you see are padding glyphs
output by Emacs when it displays a double-width character. On my
terminal emulator, the results are satisfactory, and I see no
artifacts. Are you sure the spaces you saw aren't just visual
surprises, and otherwise don't present any real problems? If they do
present real problems, can you describe them in more detail, including
the exact sequence of characters you typed for that?
> Now the question is: should this be added to the linux terminal setup in
> Emacs, and for what character range.
No. That is just a kludgey workaround for some problem I don't yet
understand well enough.
> If I am right, all Unicode code points above 0x20 print just one
> character to the terminal, except if they don't print anything.
That should not be that way. Some characters are double-width, and
should take up 2 columns on display.
> Probably there is no other documentation than the kernel source – or
> at least the documentation is outdated. Linux console is kind of
> deprecated, but it is still sort of maintained as there is no
> alternative being developed.
Perhaps you should take this up with the developers, then. But I'd
like to understand better what display problems you saw originally,
because all I read there now is that you saw those extra spaces.
> Is there a way to get a list of code points that Emacs thinks have a width of
> something else than 1?
You can use map-char-table to display all characters that have width
of 2 columns. Or you can look in lisp/international/characters.el,
around line 1250, where double-width characters are listed.
next prev parent reply other threads:[~2021-09-28 18:35 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 14:11 bug#50865: 28.0.50; Emoji with emoji modifier in Linux console garbles emacs display Aura Kelloniemi
2021-09-28 16:12 ` Eli Zaretskii
2021-09-28 16:54 ` Aura Kelloniemi
2021-09-28 17:21 ` Eli Zaretskii
2021-09-28 17:41 ` Aura Kelloniemi
2021-09-28 18:35 ` Eli Zaretskii [this message]
2021-09-28 19:20 ` Aura Kelloniemi
2021-09-28 20:32 ` Aura Kelloniemi
2021-09-29 13:00 ` Eli Zaretskii
2021-10-01 13:23 ` Aura Kelloniemi
2021-10-01 13:35 ` Eli Zaretskii
2021-10-01 14:33 ` Aura Kelloniemi
2021-10-01 15:41 ` Eli Zaretskii
2021-10-01 16:02 ` Aura Kelloniemi
2021-10-01 17:48 ` Eli Zaretskii
2021-10-02 10:58 ` Eli Zaretskii
2021-10-02 11:21 ` Andreas Schwab
2021-10-02 11:56 ` Eli Zaretskii
2021-10-04 12:25 ` Aura Kelloniemi
2021-10-04 13:15 ` Eli Zaretskii
2021-10-04 16:35 ` Eli Zaretskii
2021-10-04 16:51 ` Aura Kelloniemi
2021-10-04 17:06 ` Eli Zaretskii
2022-09-02 12:08 ` Lars Ingebrigtsen
2022-09-02 12:31 ` Gregory Heytings
2022-09-02 12:59 ` Eli Zaretskii
2022-09-02 13:19 ` Gregory Heytings
2021-10-02 8:11 ` Lars Ingebrigtsen
2021-10-02 8:54 ` 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=8335pok0pv.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=50865@debbugs.gnu.org \
--cc=kaura.dev@sange.fi \
/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.