all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: 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: Mon, 04 Oct 2021 19:35:23 +0300	[thread overview]
Message-ID: <83o884694k.fsf@gnu.org> (raw)
In-Reply-To: <837det6ida.fsf@gnu.org> (message from Eli Zaretskii on Mon, 04 Oct 2021 16:15:45 +0300)

> Date: Mon, 04 Oct 2021 16:15:45 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 50865@debbugs.gnu.org
> 
> > From: Aura Kelloniemi <kaura.dev@sange.fi>
> > Cc: 50865@debbugs.gnu.org
> > Date: Mon, 04 Oct 2021 15:25:23 +0300
> > 
> > The solution of modifying char-width-table at least worked very well for me.
> > Of course I am intetrested in the things that will break, if I use it, but
> > most likely those will be smaller annoyances than a garbled display.
> > 
> > I can document this hack on emacs wiki, if nothing else can be done.
> 
> I don't recommend documenting such a "solution", because
> char-width-table affects more than just the display of wide
> characters, it also affects Lisp programs that use string-width and
> similar functions.

Here's a potentially better solution, which uses the display-table
feature built into Emacs to display problematic characters as some
other characters:

  (or standard-display-table
      (setq standard-display-table (make-display-table)))
  (aset standard-display-table
	#x1f64f (vector (make-glyph-code #xFFFD 'escape-glyph)))

This sets Emacs to display the U+01F64F PERSON WITH FOLDED HANDS
character as a diamond with a special face.  If the diamond also
causes trouble, try replacing it with some ASCII character, like '?'.

If this gives good results, you can do the same for any other
problematic character.  The disadvantage is that they all will look
the same on display, and the only way of knowing what is the real
codepoint in the buffer is to go to the character and type "C-u C-x =".






  reply	other threads:[~2021-10-04 16: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
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 [this message]
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=83o884694k.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.