unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
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:52:42 +0100	[thread overview]
Message-ID: <m1zfxyj97p.fsf@yahoo.es> (raw)
In-Reply-To: <83a5py9iy6.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 25 Dec 2023 21:32:33 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

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

Not really.  I think point adjustment is really needed in the emoji-list
buffer; otherwise, sometimes you’d need to press C-f multiple times to
go from one emoji to the next one, when compositions are involved.

Here’s a complete recipe to understand the issue better:

emacs -Q

Eval the following code:

(add-hook #'post-command-hook
          (lambda ()
            (message "Column: %d" (current-column)))
          nil)

M-x column-number-mode
M-x emoji-list
C-s people > activity
C-n
C-n
C-f

The mode-line shows point is at line 115 and column 9, but the echo area
shows "Column: 8".

However, if you click on the emoji at column 9, then the echo area
correctly shows "Column: 9".





  reply	other threads:[~2023-12-25 20:52 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
2023-12-25 20:52     ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
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=m1zfxyj97p.fsf@yahoo.es \
    --to=bug-gnu-emacs@gnu.org \
    --cc=67204@debbugs.gnu.org \
    --cc=awrhygty@outlook.com \
    --cc=eliz@gnu.org \
    --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).