GNU bug report logs - #67204
29.1; request: always echo EMOJI name while emoji-list

Previous Next

Package: emacs;

Reported by: awrhygty <at> outlook.com

Date: Wed, 15 Nov 2023 17:29:04 UTC

Severity: normal

Found in version 29.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 67204 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: mardani29 <at> yahoo.es
Cc: 67204 <at> debbugs.gnu.org, awrhygty <at> outlook.com
Subject: Re: bug#67204: 29.1; request: always echo EMOJI name while emoji-list
Date: Sat, 30 Dec 2023 11:20:59 +0200
> Cc: 67204 <at> debbugs.gnu.org, awrhygty <at> outlook.com
> Date: Fri, 29 Dec 2023 17:44:15 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Cc: 67204 <at> debbugs.gnu.org, awrhygty <at> outlook.com
> > Date: Fri, 29 Dec 2023 17:38:59 +0200
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > 
> > I cannot reproduce this.  I get:
> > 
> >   person getting massage
> >   person getting haircut
> >   person walking
> >   person running
> >   people with bunny ears
> >   woman dancing
> 
> Sorry, this was in Emacs 29.  In Emacs 20 I indeed see what you see.
> (But the OP used Emacs 29.1.)  Will investigate.

OK, I see the issue now: it's because C-f/C-b still moves by one
character in this buffer, and we basically rely on point-adjustment to
move to the next emoji.  The cases where the echo is incorrect, point
after C-f is still on the same emoji, not on the next one, whereas
after point adjustment it is on the next emoji.

The solution to that is not to show the emoji name from the
post-command-hook, but from an idle timer.  Like this:

  (add-hook #'post-command-hook
	    (lambda ()
	      (run-with-idle-timer 0.02 nil
				   (lambda ()
				     (when-let
					 ((glyph (get-text-property (point)
								    'emoji-glyph))
					  (name (emoji--name glyph)))
				       (message "%s" name)))))
	    nil 'local)

We could have this as an optional feature, or we could leave this
alone and rely on users who want this to customize their Emacs like
above.




This bug report was last modified 1 year and 191 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.