From unknown Wed Jun 18 00:26:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#32389 <32389@debbugs.gnu.org> To: bug#32389 <32389@debbugs.gnu.org> Subject: Status: Default behaviour of xref-find-references is inconsistent with the documentation Reply-To: bug#32389 <32389@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:26:56 +0000 retitle 32389 Default behaviour of xref-find-references is inconsistent wit= h the documentation reassign 32389 emacs submitter 32389 Shitikanth severity 32389 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 07 11:17:08 2018 Received: (at submit) by debbugs.gnu.org; 7 Aug 2018 15:17:08 +0000 Received: from localhost ([127.0.0.1]:43813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fn3jQ-0007n4-9K for submit@debbugs.gnu.org; Tue, 07 Aug 2018 11:17:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmxmh-0004bt-IO for submit@debbugs.gnu.org; Tue, 07 Aug 2018 04:56:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmxmb-00055b-Jg for submit@debbugs.gnu.org; Tue, 07 Aug 2018 04:56:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51720) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fmxmb-00055A-FN for submit@debbugs.gnu.org; Tue, 07 Aug 2018 04:56:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmxma-0006HG-AD for bug-gnu-emacs@gnu.org; Tue, 07 Aug 2018 04:56:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmxmZ-00052l-Gw for bug-gnu-emacs@gnu.org; Tue, 07 Aug 2018 04:56:00 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:35320) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fmxmZ-00052W-6c for bug-gnu-emacs@gnu.org; Tue, 07 Aug 2018 04:55:59 -0400 Received: by mail-wr1-x42d.google.com with SMTP id g1-v6so11478751wru.2 for ; Tue, 07 Aug 2018 01:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=O9TCYfugXsPgGYsRHVqx+zbjanC29gK01YFup7IQQ/g=; b=KDfSyq78QkNJsCg/bn7g4/3oNACMTcy/7ikNQ+ZVO7xOt9AZ7PscaTq9osSVXNIsUp yqchsBPw19ubpC8WVA4c+c/LtRSx8Yf14sELSGYjtislIp7IDQ9fW0c+lMgvP8ygDqps mmOf07o9E11bRuB5RY8BOKpktYAsE6ItFD1Ep8mtGWhTWyBGTcVHt1eAHmQjQO+GMBjN EfbVphsY0g99q+DcEEjkFR0dJOlbmFgqYI/IbEsjN/PJ+kyQYOupNgTl33SdDEX1rMVv CMofS+f7gHUqHOYF5yXT55ID0ZLHmmFHek8tq4wivX0LBKUvpPwJQ6GznjyvKH5Hwa3s r2yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=O9TCYfugXsPgGYsRHVqx+zbjanC29gK01YFup7IQQ/g=; b=XD1fyXXlSaFqWp564ITvkvcJMf3bvBb6CgKPQrHUx5iPcy7eZLUEyO3yH3HdA09PuT mw8MOFD8ce7kz4saZr9o9G4cp5HX1ZlkvAXAVc7bNejtTrS+yIVjRlHCKBAE0lHe3jp/ Vj10e4D5oEnolW2Yu9oN29GOZGaL2AZqWgxz8weh7igej9HebJclVGalVkncP/wwySHx 6k4yUhVNhU5EONoqvjE+DZTUeIAjhZ+ZAkglpqjCW9SrN48jnpuJCMI/4UMiKcTN7UWZ WNlhZ+n9psSxkb4xMD/+jqWX0ejJbPdwqX3w+MqTXVs3qTxtffXxy2gpVMEsZSYVlr6f Kh/A== X-Gm-Message-State: AOUpUlEptF+iyvv8XmxMhEyTMV5ZsokQ5Djldt9MgI00yRhLktPQ1VPe AMnB70ipC0kYLUGp0VVwdOBSVU5nikiLEGFohm5XXm6n X-Google-Smtp-Source: AA+uWPxH6HlJYAW1bPGRiyPzUxM2fw3Q3l6HurBVDY86FenF5/c5SPw1SoqE7Qaw6csByIVe1I1/PvW+TgPnlmebtMQ= X-Received: by 2002:adf:ff11:: with SMTP id k17-v6mr1876321wrr.255.1533632157610; Tue, 07 Aug 2018 01:55:57 -0700 (PDT) MIME-Version: 1.0 From: Shitikanth Date: Tue, 7 Aug 2018 14:25:46 +0530 Message-ID: Subject: Default behaviour of xref-find-references is inconsistent with the documentation To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000f877270572d48f67" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 07 Aug 2018 11:17:05 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.8 (----) --000000000000f877270572d48f67 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Related to bug#29619. 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: =E2=80=98M-?=E2=80=99 finds all the references for the identifier at po= int. If there=E2=80=99s no identifier at point, or when invoked with a prefix argument, the comman= d 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). 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. --000000000000f877270572d48f67 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Related to bug#29619.

<= /div>
The function document= ation of xref-find-references says:

=C2=A0 =C2=A0 Find references to the identifier at point. With= prefix argument, prompt for
=C2=A0 =C2=A0 the identifier.

The Emacs manual (Node: Identifier Search) says:

<= div>=C2=A0 =C2=A0 =E2=80=98M-?= =E2=80=99 finds all the references for the identifier at point. If there=E2= =80=99s no
=C2= =A0 =C2=A0 identifier at point, or when invoked with a prefix argument, the= command
=C2= =A0 =C2=A0 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 (irrespec= tive of whether it is
invoked with or without the prefix-arg). The only way to get the do= cumented
behav= iour is by customizing xref-prompt-for-identifier, and there is no way of
discovering thi= s without reading the source code.
--000000000000f877270572d48f67-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 07 12:20:35 2018 Received: (at 32389-done) by debbugs.gnu.org; 7 Aug 2018 16:20:35 +0000 Received: from localhost ([127.0.0.1]:43853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fn4io-0000v6-Vu for submit@debbugs.gnu.org; Tue, 07 Aug 2018 12:20:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fn4in-0000uq-46 for 32389-done@debbugs.gnu.org; Tue, 07 Aug 2018 12:20:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fn4if-0001Cx-Bm for 32389-done@debbugs.gnu.org; Tue, 07 Aug 2018 12:20:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fn4if-0001Co-6c; Tue, 07 Aug 2018 12:20:25 -0400 Received: from [176.228.60.248] (port=2994 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fn4ie-0001iJ-NJ; Tue, 07 Aug 2018 12:20:25 -0400 Date: Tue, 07 Aug 2018 19:20:23 +0300 Message-Id: <83zhxyp2rc.fsf@gnu.org> From: Eli Zaretskii To: Shitikanth In-reply-to: (message from Shitikanth on Tue, 7 Aug 2018 14:25:46 +0530) Subject: Re: bug#32389: Default behaviour of xref-find-references is inconsistent with the documentation References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32389-done Cc: 32389-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Shitikanth > 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 07 14:26:53 2018 Received: (at 32389) by debbugs.gnu.org; 7 Aug 2018 18:26:53 +0000 Received: from localhost ([127.0.0.1]:43915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fn6h2-00042m-NR for submit@debbugs.gnu.org; Tue, 07 Aug 2018 14:26:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:32907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fn6h0-00042V-Ut for 32389@debbugs.gnu.org; Tue, 07 Aug 2018 14:26:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fn6gs-0002Q3-Pf for 32389@debbugs.gnu.org; Tue, 07 Aug 2018 14:26:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fn6gs-0002Pp-MC; Tue, 07 Aug 2018 14:26:42 -0400 Received: from [176.228.60.248] (port=2878 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fn6gs-0001HG-6K; Tue, 07 Aug 2018 14:26:42 -0400 Date: Tue, 07 Aug 2018 21:26:40 +0300 Message-Id: <83mutyowwv.fsf@gnu.org> From: Eli Zaretskii To: Shitikanth In-reply-to: (message from Shitikanth on Tue, 7 Aug 2018 23:45:42 +0530) Subject: Re: bug#32389: Default behaviour of xref-find-references is inconsistent with the documentation References: <83zhxyp2rc.fsf@gnu.org> <83va8mp0hv.fsf@gnu.org> <83pnyuozvf.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32389 Cc: 32389@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Shitikanth > Date: Tue, 7 Aug 2018 23:45:42 +0530 > > I, for one, feel that this has become more complex than it needs to be. Since C-u M-? > gives the option to force a prompt anyway, the default behaviour should be for M-? > to not show a prompt unless needed (that is if the xref-backend is not able to find > an identifier at point). You are arguing for a change in the default behavior, something that we don't usually do based on a single opinion. You can always customize xref-prompt-for-identifier on your system to get this behavior for yourself; changing that for everyone requires some kind of user poll, at least. From unknown Wed Jun 18 00:26:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 05 Sep 2018 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator