From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ray Newsgroups: gmane.emacs.bugs Subject: bug#29619: Fwd: [xref.el] Add `xref-find-references` to `xref-prompt-for-identifier` Date: Sat, 9 Dec 2017 09:52:00 -0800 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1512841994 15093 195.159.176.226 (9 Dec 2017 17:53:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 9 Dec 2017 17:53:14 +0000 (UTC) Cc: 29619@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 09 18:53:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNjJC-0003e9-6c for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Dec 2017 18:53:06 +0100 Original-Received: from localhost ([::1]:42140 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNjJJ-0008V2-Bn for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Dec 2017 12:53:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNjJB-0008Uj-TW for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2017 12:53:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNjJ8-0007Xg-QU for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2017 12:53:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45386) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eNjJ8-0007Xa-MD for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2017 12:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eNjJ7-0005qd-Ig for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2017 12:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ray Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Dec 2017 17:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29619 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29619-submit@debbugs.gnu.org id=B29619.151284192822413 (code B ref 29619); Sat, 09 Dec 2017 17:53:01 +0000 Original-Received: (at 29619) by debbugs.gnu.org; 9 Dec 2017 17:52:08 +0000 Original-Received: from localhost ([127.0.0.1]:54067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNjIG-0005pR-JF for submit@debbugs.gnu.org; Sat, 09 Dec 2017 12:52:08 -0500 Original-Received: from mail-oi0-f50.google.com ([209.85.218.50]:34491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNjIE-0005ox-NR for 29619@debbugs.gnu.org; Sat, 09 Dec 2017 12:52:07 -0500 Original-Received: by mail-oi0-f50.google.com with SMTP id u193so9170901oie.1 for <29619@debbugs.gnu.org>; Sat, 09 Dec 2017 09:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZX9bk5s7yA0kGlyA+c6d7SY1MvlT9f3GyEjrr5T8iTk=; b=kmFfR4jvmrebs+k5+QlmD++Pv2H1d5rY2B+731J60bPPP/HU13MB+Xq9Xq0L7w3Rm3 pWpT7KdOodm4S8q3nUXNtzUM+9DtfqT8WAp2C/YvZIaOaFT2Kef1VPMxChKYG4nmg6yZ 2K4L6XaUlss1IPnIzRnwMz61mKXYtpj0XVx46tfgBziQW48gvF2op7uYKm2ZWkbHd3d5 /n6yujdhmaogL/w7XZGKmABzrB33ExrqRrV2tV0upxwGrW21+JyBF9syVI2VH/0ZYhtk /6LHxz0tngD3Liw5ITqBvlvgkwbfVN5Tk/shsq7CxdNs2pKnh/1P72Si8rKJsEHiYnR5 llvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ZX9bk5s7yA0kGlyA+c6d7SY1MvlT9f3GyEjrr5T8iTk=; b=YfzR5kY5/5UtQFMB+Z7FgmHg+ikenvqvhE7YhPipK089zK/g+6nEswy/Y1KprktNA6 Yngy1KxdNxBUoh2Bzsg9Jc9wG1gWhJCaH/QMznzOJTBV+c9Ikom8npSA/UbkeY3Z5qKX s3q8yzCY+bHRgoMX+UuL+BZvaNCxMq/R/ABuEgOMmDN2EDej55HgIVrkNfwLTYVS3Cz2 1Uu+z0CNCMF20oiPUcteDIioGwlCWBKxNSsy0iWmSmDlcMwb9L30E4a1L3kW0kCL47gG bUUwuhd4rvIe/bV8AGiWtm9wRacB/cGlGBBnjV6Vwi6HdlpXWBGdnKZ+vT+EKm3PcVFi QyrA== X-Gm-Message-State: AKGB3mLu3QZKpgwuOQltH22XyAWuRWMsN24vjvtu9Juri8Ca1Kh/WV3/ L4PYUk/5cZQA3aMB7Cyx0PMopHSKDzcOLM7mQOM= X-Google-Smtp-Source: AGs4zMZS68hLbJ122io0US2Ctl3ueBds3smQL/teOrRKHTm+YkLm+yLvyekY+MpvwPuOKj0juzt3gyxGlccF2BJJx/o= X-Received: by 10.202.223.70 with SMTP id w67mr14619469oig.229.1512841920732; Sat, 09 Dec 2017 09:52:00 -0800 (PST) Original-Received: by 10.74.71.212 with HTTP; Sat, 9 Dec 2017 09:52:00 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140867 Archived-At: Thanks for being open to change the default if more people feel the same. With the xref system people use drifting from tag based (ctags,etags,GNU GLOBAL,cscope,...) tools to Language Server Protocol (cquery, rls, ...), a single identifier without position has become insufficient to describe the one the user wants to look up. For example, a local variable/struct/lambda `foo` may exist in different functions. I'm using a C++ language server called cquery. This is what I get (for the argument `identifier`) when I hit the key bound to `xref-find-definitions`: #("QueryDatabase" 0 13 (fontified t ref-params (:textDocument (:uri "file:///home/maskray/Dev/Util/cquery/src/query_utils.h") :position (:line 11 :character 54) :context (:includeDeclaration :json-false)) def-params (:textDocument (:uri "file:///home/maskray/Dev/Util/cquery/src/query_utils.h") :position (:line 11 :character 54)))) Here the text properties are more useful than the identifier itself, because LSP uses position instead of identifier to sending requests to the language server. https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#textdocumentpositionparams This is my 2 cents. I am totally fine to live with the current default `xref-prompt-for-identifier` because I can customize it. On Sat, Dec 9, 2017 at 7:25 AM, Dmitry Gutov wrote: > On 12/8/17 11:27 PM, Ray wrote: >> >> Currently, xref-find-references prompts for the identifier to look up, >> because it is not listed in xref-prompt-for-identifier: >> >> (defcustom xref-prompt-for-identifier '(not xref-find-definitions >> >> xref-find-definitions-other-window >> >> xref-find-definitions-other-frame) >> >> It will be much core convenient to add xref-find-references in the list. > > > We've discussed it before, and for now have settled on this list of > non-prompting functions. > > But thank you for your report. We may change the default if more people feel > the same.