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


View this message in rfc822 format

From: Daniel Martín <mardani29 <at> yahoo.es>
To: awrhygty <at> outlook.com
Cc: 67204 <at> debbugs.gnu.org
Subject: bug#67204: 29.1; request: always echo EMOJI name while emoji-list
Date: Mon, 25 Dec 2023 19:59:49 +0100
awrhygty <at> outlook.com writes:

> #'emoji-list creates '*Emoji*' buffer containing EMOJIs.
> Typing 'h' shows a name of a EMOJI under the current point.
> If the names are always echoed, selection may be easier.
>
> I tried the form below in the '*Emoji*' buffer:
>   (add-hook #'post-command-hook
>             (lambda ()
>               (when-let ((glyph (get-text-property (point) 'emoji-glyph))
>                          (name (emoji--name glyph)))
>                 (message "%s" name)))
>             nil 'local)
> But it is not successfull when moving to/from composed character EMOJI.
>

This is because Emacs automatically moves the point when it’s in the
middle of text with the ’composition’ property.  See (elisp) Adjusting
Point in the Elisp Info manual for more information about this feature.

It seems that post-command-hook is invoked _before_ the point is moved,
so querying the position of point inside post-command-hook does not
always give correct results.  You could add your code to the
pre-redisplay-function instead.

About what you propose, I think that showing the name of the Emoji under
point may be a good new feature of emoji-list.  What do others think?




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

Previous Next


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