From: Dmitry Gutov <dmitry@gutov.dev>
To: Eshel Yaron <me@eshelyaron.com>, 71068@debbugs.gnu.org
Subject: bug#71068: 30.0.50; Incorrect xref positions for eglot-execute
Date: Sun, 26 May 2024 06:04:56 +0300 [thread overview]
Message-ID: <57e38600-785a-4a12-b69a-001e2e3e3977@gutov.dev> (raw)
In-Reply-To: <m134qd94ov.fsf@dazzs-mbp.kpn>
Hi! Thanks for the report.
On 19/05/2024 18:55, Eshel Yaron via Bug reports for GNU Emacs, the
Swiss army knife of text editors wrote:
> Using xref to find the definition of eglot-execute seems to yield
> imprecise definition locations:
>
> 1. emacs -Q
> 2. (require 'eglot)
> 3. M-. eglot-execute RET
>
> This produces an*xref* buffer that lists two definitions:
>
> --8<---------------cut here---------------start------------->8---
> .../lisp/progmodes/eglot.el
> (cl-defgeneric eglot-execute)
> (cl-defmethod eglot-execute (server action))
> --8<---------------cut here---------------end--------------->8---
>
> Following the first definition leads to the definition of
> eglot-execute-command (which is different from eglot-execute, although
> the former is defined right above the latter), while the second
> definition leads to the top of the file.
I've (hopefully) fixed the first problem just now in commit 2a12f39ffe8.
Regarding the second one, looks like it's using a more advanced syntax
that our functions haven't been taught about.
Since the method has been defined through a :method property on
defgeneric, I suppose cl--generic-search-method should be taught to
search for such definitions too.
The definition itself could be rewritten in a simpler fashion, though.
Just using cl-defmethod (the generic is then created implicitly, and the
arguments list is not repeated).
next prev parent reply other threads:[~2024-05-26 3:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-19 15:55 bug#71068: 30.0.50; Incorrect xref positions for eglot-execute Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-26 3:04 ` Dmitry Gutov [this message]
2024-05-26 8:00 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-29 1:37 ` Dmitry Gutov
2024-06-03 5:47 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-03 11: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=57e38600-785a-4a12-b69a-001e2e3e3977@gutov.dev \
--to=dmitry@gutov.dev \
--cc=71068@debbugs.gnu.org \
--cc=me@eshelyaron.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).