unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Protesilaos Stavrou <info@protesilaos.com>
Cc: 57066@debbugs.gnu.org
Subject: bug#57066: 29.0.50; Complex emoji overlaps with text
Date: Tue, 09 Aug 2022 19:05:06 +0300	[thread overview]
Message-ID: <835yj1v1vy.fsf@gnu.org> (raw)
In-Reply-To: <87lerxzim5.fsf@protesilaos.com> (message from Protesilaos Stavrou on Tue, 09 Aug 2022 15:50:10 +0300)

> From: Protesilaos Stavrou <info@protesilaos.com>
> Cc: 57066@debbugs.gnu.org
> Date: Tue, 09 Aug 2022 15:50:10 +0300
> 
> >> Right after inserting the "sun" emoji, the 'describe-char' does not
> >> work.  The echo area shows:
> >> 
> >>     point=154 of 153 (EOB) column=7
> >
> > Are you saying that what describe-char does at EOB means it doesn't
> > work?  The above is exactly the expected result at EOB.
> 
> Sorry, I meant that I could not produce a Help buffer.

That's expected: there's no character at EOB.

> >>     cl--assertion-failed: Assertion failed: (not (multibyte-string-p str))
> >
> > I cannot reproduce that, either.  Could you run this under Edebug and
> > show the value of 'str' in the above assertion?
> 
> I am not sure how to do it with Edebug.

I tried to explain that below.

> With (setq debug-on-error t) I get this:
> 
> Debugger entered--Lisp error: (cl-assertion-failed ((not (multibyte-string-p str)) nil))
>   cl--assertion-failed((not (multibyte-string-p str)))
>   encoded-string-description(#("😀" 0 1 (charset unicode)) nil)
>   describe-char(146)

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

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))

Thanks.





  reply	other threads:[~2022-08-09 16:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09  9:17 bug#57066: 29.0.50; Complex emoji overlaps with text Protesilaos Stavrou
2022-08-09 11:14 ` Eli Zaretskii
2022-08-09 11:28   ` Protesilaos Stavrou
2022-08-09 12:01     ` Eli Zaretskii
2022-08-09 12:50       ` Protesilaos Stavrou
2022-08-09 16:05         ` Eli Zaretskii [this message]
2022-08-09 17:17           ` Protesilaos Stavrou
2022-08-09 17:31             ` Eli Zaretskii
2022-08-09 17:41               ` Protesilaos Stavrou
2022-08-09 17:54                 ` Eli Zaretskii
2022-08-10  3:15                   ` Protesilaos Stavrou
2022-08-10 12:33                     ` Eli Zaretskii
2022-08-11  4:07                       ` Protesilaos Stavrou
2022-08-11  6:01                         ` YAMAMOTO Mitsuharu
2022-08-11  6:24                           ` YAMAMOTO Mitsuharu
2022-08-11  6:35                             ` Protesilaos Stavrou
2022-08-11  6:49                             ` Eli Zaretskii
2022-08-11  7:23                               ` YAMAMOTO Mitsuharu
2022-08-11  7:43                                 ` Eli Zaretskii
2022-08-11  8:57                                   ` YAMAMOTO Mitsuharu
2022-08-11  9:35                                     ` Eli Zaretskii
2022-08-11  9:49                                       ` YAMAMOTO Mitsuharu
2022-08-09 11:23 ` Fernando de Morais
2022-08-09 11:54   ` Eli Zaretskii
2022-08-09 12:06     ` Fernando de Morais
2022-08-09 18:28   ` Lars Ingebrigtsen
2022-08-10  3:16     ` Protesilaos Stavrou

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=835yj1v1vy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=57066@debbugs.gnu.org \
    --cc=info@protesilaos.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).