[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67204: 29.1; request: always echo EMOJI name while emoji-list
From: |
Eli Zaretskii |
Subject: |
bug#67204: 29.1; request: always echo EMOJI name while emoji-list |
Date: |
Mon, 25 Dec 2023 21:32:33 +0200 |
> Cc: 67204@debbugs.gnu.org
> Date: Mon, 25 Dec 2023 19:59:49 +0100
> From: Daniel Martín via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> awrhygty@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.
Would temporarily disabling point adjustment help here?
- bug#67204: 29.1; request: always echo EMOJI name while emoji-list, Daniel Martín, 2023/12/25
- bug#67204: 29.1; request: always echo EMOJI name while emoji-list,
Eli Zaretskii <=
- bug#67204: 29.1; request: always echo EMOJI name while emoji-list, Daniel Martín, 2023/12/25
- bug#67204: 29.1; request: always echo EMOJI name while emoji-list, Eli Zaretskii, 2023/12/29
- bug#67204: 29.1; request: always echo EMOJI name while emoji-list, Daniel Martín, 2023/12/29
- bug#67204: 29.1; request: always echo EMOJI name while emoji-list, Eli Zaretskii, 2023/12/29
- bug#67204: 29.1; request: always echo EMOJI name while emoji-list, Eli Zaretskii, 2023/12/29
- bug#67204: 29.1; request: always echo EMOJI name while emoji-list, Eli Zaretskii, 2023/12/30
- bug#67204: 29.1; request: always echo EMOJI name while emoji-list, Daniel Martín, 2023/12/29