From: Mike Kupfer <m.kupfer@acm.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22692@debbugs.gnu.org
Subject: bug#22692: docstring for xref-find-definitions
Date: Thu, 18 Feb 2016 10:48:16 -0800 [thread overview]
Message-ID: <2736.1455821296@allegro.localdomain> (raw)
In-Reply-To: Your message of "Thu, 18 Feb 2016 18:50:45 +0200." <83ziuyt122.fsf@gnu.org>
Eli Zaretskii wrote:
> > From: Mike Kupfer <m.kupfer@acm.org>
> > Date: Wed, 17 Feb 2016 19:45:21 -0800
> >
> > Based on the behavior that I observe (using "emacs -Q" to visit
> > src/frame.c), the docstring for xref-find-definitions would be more
> > accurate if the first paragraph were replaced by
> >
> > Find the definition of the identifier at point.
> > If there is no identifier at point, use an identifier (or numeric
> > literal) near point on the same line.
>
> We cannot be this specific, not as long as the doc string is literal
> text defined as part of 'defun'. The exact definition of what is "the
> identifier at point" depends on the xref backend set up by the major
> mode. That definition could be very smart or it could be less smart.
> The command doesn't know.
Okay. Is there an easy way for the user to tell which backend is in
use? If there is, then maybe the docstring could say something general
and then note that the user could also check the backend's
documentation.
> If we want to be accurate here, we will need to come up with a way for
> the back-end to supply its definition, and incorporate that in the doc
> string that is created dynamically. Do we have infrastructure for
> that?
Not that I know of, but I don't know much about Emacs's documentation
infrastructure.
> Failing that, the only band-aid I can offer is something like
>
> Find the definition of the identifier at or near point.
>
> If you think it's better, we can make that change now.
Yes, I think that would be an improvement. Thanks.
> > Trying to look up the definition for a numeric literal strikes me as
> > odd, but that's the behavior I'm seeing.
>
> Did you use M-. in Emacs 24 and before? Because that's exactly what
> it did in this case, it would say this in the echo area:
>
> Find tag (default 1):
Interesting. I use M-. a lot, and I never noticed this. I suppose it's
because I know I'm going to type in the name that I'm looking for, so I
ignore the default.
> The reason is that this is what etags.el does when asked to find "the
> identifier at or near point". Patches to make it smarter are welcome.
> (The relevant function is find-tag-default-bounds.)
Okay. I'll add this to my spare-time projects list.
thanks,
mike
next prev parent reply other threads:[~2016-02-18 18:48 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 1:02 bug#22692: 25.0.91; xref-find-definitions fails to prompt Mike Kupfer
2016-02-16 3:44 ` Eli Zaretskii
2016-02-16 10:10 ` Dmitry Gutov
2016-02-16 16:01 ` Eli Zaretskii
2016-02-16 10:12 ` Dmitry Gutov
2016-02-17 1:55 ` Mike Kupfer
2016-02-19 13:43 ` Dmitry Gutov
2016-02-19 15:10 ` Mike Kupfer
2016-02-19 15:59 ` Eli Zaretskii
2016-02-19 18:08 ` Dmitry Gutov
2016-02-19 18:37 ` Eli Zaretskii
2016-02-19 18:52 ` Dmitry Gutov
2016-02-19 20:24 ` Eli Zaretskii
2016-02-20 1:28 ` Dmitry Gutov
2016-02-20 8:45 ` Eli Zaretskii
2016-02-21 3:36 ` Mike Kupfer
2016-02-21 22:56 ` Dmitry Gutov
2016-02-23 0:43 ` Dmitry Gutov
2016-02-23 2:19 ` Mike Kupfer
2016-02-18 3:45 ` bug#22692: docstring for xref-find-definitions Mike Kupfer
2016-02-18 16:50 ` Eli Zaretskii
2016-02-18 18:48 ` Mike Kupfer [this message]
2016-02-19 13:04 ` Dmitry Gutov
2016-02-19 13:01 ` Dmitry Gutov
2016-02-19 15:34 ` Eli Zaretskii
2016-02-20 1:24 ` Dmitry Gutov
2016-02-20 8:33 ` Eli Zaretskii
2016-02-23 0:04 ` Juri Linkov
2016-02-23 0:35 ` Dmitry Gutov
2016-02-27 10:32 ` Eli Zaretskii
2016-02-27 12:35 ` Dmitry Gutov
2016-02-27 12:43 ` Eli Zaretskii
2016-02-29 2:48 ` Dmitry Gutov
2016-02-23 0:41 ` Drew Adams
2016-02-21 3:42 ` Mike Kupfer
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=2736.1455821296@allegro.localdomain \
--to=m.kupfer@acm.org \
--cc=22692@debbugs.gnu.org \
--cc=eliz@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 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).