bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57066: 29.0.50; Complex emoji overlaps with text


From: Protesilaos Stavrou
Subject: bug#57066: 29.0.50; Complex emoji overlaps with text
Date: Tue, 09 Aug 2022 20:17:12 +0300
User-agent: Notmuch/0.36 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu)

> From: Eli Zaretskii <eliz@gnu.org>
> Date: Tue, 09 Aug 2022 19:05:06 +0300
>
> There are 2 calls to encoded-string-description in describe-char, and
> it's important to know which one causes this and why.
>
> To run this under Edebug, do the following
>
>   emacs -Q
>   M-x load-library RET descr-text.el RET
>   C-x C-f /path/to/lisp/international/descr-text.el RET
>   C-u 385 M-g g
>   M-x edebug-defun RET

Thank you!  I followed the instructions.  Though note that descr-text.el
was in lisp/descr-text.el without the "international" part.

> Note that you must load-library with an explicit .el extension.
>
> Line 385 in descr-text.el is where describe-char starts.
>
> Then repeat the recipe, and when you call describe-char, Edebug will
> kick in.  Now step through the code and try to figure out which call
> to encoded-string-description is the one that barfs.  My guess is that
> it's the second one, in which case it is important to know the value
> of the variable 'charset' here:
>
>       ("file code"
>        ,@(if multibyte-p
>            (let* ((coding buffer-file-coding-system)
>                   (encoded (encode-coding-char char coding charset))) <<<<<<
>              (if encoded
>                  (list (encoded-string-description encoded coding)
>                        (format "(encoded by coding system %S)"
>                                coding))

It is as you surmised about the seond call.  The charset itself gives:

    Result: unicode

While the form (encode-coding-char char coding charset) returns:

    Result: #("😀" 0 1 (charset unicode))

Then the error is in (encoded-string-description encoded coding):

    Assertion failed: ((not (multibyte-string-p str)) nil)

The reason is that (coding buffer-file-coding-system) returns nil.

-- 
Protesilaos Stavrou
https://protesilaos.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]