all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#65578: Eglot with mouse
@ 2023-08-28  7:13 Juri Linkov
  2023-08-28  9:20 ` João Távora
  2023-08-28 13:41 ` Dmitry Gutov
  0 siblings, 2 replies; 8+ messages in thread
From: Juri Linkov @ 2023-08-28  7:13 UTC (permalink / raw)
  To: 65578; +Cc: jo�o t�vora

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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-31  0:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-28  7:13 bug#65578: Eglot with mouse Juri Linkov
2023-08-28  9:20 ` 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

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.