From: Eli Zaretskii <eliz@gnu.org>
To: Shitikanth <shitikanth1@gmail.com>
Cc: 32389-done@debbugs.gnu.org
Subject: bug#32389: Default behaviour of xref-find-references is inconsistent with the documentation
Date: Tue, 07 Aug 2018 19:20:23 +0300 [thread overview]
Message-ID: <83zhxyp2rc.fsf@gnu.org> (raw)
In-Reply-To: <CALjXJSQE1pzARTr_VJ9xudxsp_=2fxmMWTf_nw66KwnnfcuHug@mail.gmail.com> (message from Shitikanth on Tue, 7 Aug 2018 14:25:46 +0530)
> From: Shitikanth <shitikanth1@gmail.com>
> Date: Tue, 7 Aug 2018 14:25:46 +0530
>
> The function documentation of xref-find-references says:
>
> Find references to the identifier at point. With prefix argument, prompt for
> the identifier.
>
> The Emacs manual (Node: Identifier Search) says:
>
> ‘M-?’ finds all the references for the identifier at point. If there’s no
> identifier at point, or when invoked with a prefix argument, the command
> prompts for the identifier, with completion.
>
> Inconsistent to both, the actual behaviour of xref-find-references and M-? is to
> *always* prompt for the identifier from the user (irrespective of whether it is
> invoked with or without the prefix-arg).
That's inaccurate: the actual behavior depends on the Xref backend,
and cannot be predicted in advance for every backend. If the
backend-specific xref-backend-identifier-at-point method returns a
non-nil identifier, the command will not prompt.
However, the current documentation is also clearly inaccurate, so I
made it more so.
> The only way to get the documented
> behaviour is by customizing xref-prompt-for-identifier, and there is no way of
> discovering this without reading the source code.
Good point, I added a reference to the variable to the documentation
of the command.
With that, I'm closing the bug. Thanks for bringing this to our
attention.
next prev parent reply other threads:[~2018-08-07 16:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-07 8:55 bug#32389: Default behaviour of xref-find-references is inconsistent with the documentation Shitikanth
2018-08-07 16:20 ` Eli Zaretskii [this message]
[not found] ` <CALjXJSQ_ns0NN6XeZLswB1NX6tucBM5GtEnVz1voHnOa_iRPhQ@mail.gmail.com>
[not found] ` <83va8mp0hv.fsf@gnu.org>
[not found] ` <CALjXJSSdVW7Z3rbK9v64GLa=Wtv4tvDa0f4f1RTXxuFPFPYQ1A@mail.gmail.com>
[not found] ` <83pnyuozvf.fsf@gnu.org>
[not found] ` <CALjXJSSu+jXdoMFNqpnOga5BpmGZkzUBNQ2PEnJzqDsWMQN2Rw@mail.gmail.com>
2018-08-07 18:26 ` Eli Zaretskii
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=83zhxyp2rc.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=32389-done@debbugs.gnu.org \
--cc=shitikanth1@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 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.