unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Daniel Martín" <mardani29@yahoo.es>
Cc: 67204@debbugs.gnu.org, awrhygty@outlook.com
Subject: bug#67204: 29.1; request: always echo EMOJI name while emoji-list
Date: Mon, 25 Dec 2023 21:32:33 +0200	[thread overview]
Message-ID: <83a5py9iy6.fsf@gnu.org> (raw)
In-Reply-To: <m14jg6kt0a.fsf@yahoo.es> (bug-gnu-emacs@gnu.org)

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





  reply	other threads:[~2023-12-25 19:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15  7:04 bug#67204: 29.1; request: always echo EMOJI name while emoji-list awrhygty
2023-12-25 18:59 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-25 19:32   ` Eli Zaretskii [this message]
2023-12-25 20:52     ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-29  7:44       ` Eli Zaretskii
2023-12-29 15:12         ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-29 15:38           ` Eli Zaretskii
2023-12-29 15:44             ` Eli Zaretskii
2023-12-30  9:20               ` Eli Zaretskii
2024-01-09 20:02                 ` Eli Zaretskii
2023-12-29 17:08             ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=83a5py9iy6.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=67204@debbugs.gnu.org \
    --cc=awrhygty@outlook.com \
    --cc=mardani29@yahoo.es \
    /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).