From: Juri Linkov <juri@linkov.net>
To: 65578@debbugs.gnu.org
Cc: "jo�o t�vora" <joaotavora@gmail.com>
Subject: bug#65578: Eglot with mouse
Date: Mon, 28 Aug 2023 10:13:58 +0300 [thread overview]
Message-ID: <86zg2beibp.fsf@mail.linkov.net> (raw)
X-Debbugs-CC: João Távora <joaotavora@gmail.com>
0. emacs -Q
1. enable context-menu-mode
2. enable eglot in a suitable buffer
3. move point to one identifier
4. click the right mouse button on another identifier
5. in the context menu click "Find Definition"
The problem is that a wrong identifier is visited.
Whereas 'xref-find-definitions-at-mouse' takes care
about getting the right identifier at the clicked position,
Eglot returns a fictitious identifier "LSP identifier at point"
that can't be used to find the identifier at the mouse click.
xref-find-definitions-at-mouse uses save-excursion with
mouse-set-point before calling xref-backend-identifier-at-point.
But the same save-excursion with mouse-set-point can't be added
around xref-find-definitions because save-excursion will restore
the original position after visiting the found identifier.
Also tried to add xref-find-definitions-at-mouse to the list
xref-prompt-for-identifier, no effect.
Then tried to remove '(xref--prompt-p this-command)'
from 'xref-backend-identifier-at-point ((_backend (eql eglot)))'.
This fixed xref-find-definitions-at-mouse, but still
doesn't work for xref-find-references-at-mouse.
Also removing '(xref--prompt-p this-command)' has such a strange effect
that it started to find approximate fuzzy matches that sound like
the original identifier.
next reply other threads:[~2023-08-28 7:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 7:13 Juri Linkov [this message]
2023-08-28 9:20 ` bug#65578: Eglot with mouse João Távora
2023-08-28 13:41 ` Dmitry Gutov
2023-08-28 16:42 ` Juri Linkov
2023-08-28 17:00 ` Dmitry Gutov
2023-08-28 17:11 ` João Távora
2023-08-30 16:35 ` Juri Linkov
2023-08-31 0:27 ` Dmitry Gutov
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=86zg2beibp.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=65578@debbugs.gnu.org \
--cc=joaotavora@gmail.com \
/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).