From: Po Lu <luangruo@yahoo.com>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: emacs-devel@gnu.org
Subject: Re: master 128ed5c9f17: Add one more mouse-set-point call to functions xref-find-*-at-mouse
Date: Thu, 31 Aug 2023 09:10:32 +0800 [thread overview]
Message-ID: <87edjkt3sn.fsf@yahoo.com> (raw)
In-Reply-To: <583ae120-d016-e9e8-2783-db21c1e018b8@gutov.dev> (Dmitry Gutov's message of "Thu, 31 Aug 2023 03:54:26 +0300")
Dmitry Gutov <dmitry@gutov.dev> writes:
> On 31/08/2023 03:43, Po Lu wrote:
>> My experience with the entire touch screen affair says that many such
>> errors would never have been written had `xref-find-definitions' taken
>> an EVENT argument and used its posn-point if present. Something to
>> consider, I suppose.
>
> Sorry, I don't quite understand which change you have in mind.
>
> The issue here was that we needed to move to the click's location both
> when detecting the identifier (at that point), and before using the
> identifier to find a set of locations.
>
> If we used a POSN value, it would also have to be used in two places,
> I guess. One of which we could just as easily missed as we had here.
In my opinion, commands or functions that respond to the location of a
click should always take an EVENT argument, and use:
(posn-point (event-start event))
if EVENT is present and incorporates a mouse position list. Rather than
searching for an identifier at point, it should search for an identifier
at the point of the mouse click. Adhering to such a convention is
almost guaranteed to eliminate every bug where Emacs consults something
under point instead of the mouse pointer when the user meant the latter.
Thanks.
next prev parent reply other threads:[~2023-08-31 1:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <169344150641.11482.13012085201452768898@vcs2.savannah.gnu.org>
[not found] ` <20230831002506.C0C6DC038B5@vcs2.savannah.gnu.org>
2023-08-31 0:43 ` master 128ed5c9f17: Add one more mouse-set-point call to functions xref-find-*-at-mouse Po Lu
2023-08-31 0:54 ` Dmitry Gutov
2023-08-31 1:10 ` Po Lu [this message]
2023-08-31 2:05 ` Dmitry Gutov
2023-08-31 2:51 ` Po Lu
2023-08-31 6:37 ` Juri Linkov
2023-09-01 0:59 ` Po Lu
2023-09-01 6:50 ` Juri Linkov
2023-09-03 17:34 ` Juri Linkov
2023-09-04 16:42 ` Juri Linkov
2023-08-31 11:03 ` Dmitry Gutov
2023-08-31 11:35 ` Po Lu
2023-08-31 16:38 ` Juri Linkov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87edjkt3sn.fsf@yahoo.com \
--to=luangruo@yahoo.com \
--cc=dmitry@gutov.dev \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.