From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#29619: Fwd: [xref.el] Add `xref-find-references` to `xref-prompt-for-identifier` Date: Sun, 10 Dec 2017 18:57:56 +0200 Message-ID: <0e97609a-eefc-6e0d-ce2b-6c69651d9990@yandex.ru> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1512925153 327 195.159.176.226 (10 Dec 2017 16:59:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 10 Dec 2017 16:59:13 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Thunderbird/58.0 Cc: 29619@debbugs.gnu.org To: Ray Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 10 17:59:07 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 1eO4wU-0008In-Ui for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Dec 2017 17:59:07 +0100 Original-Received: from localhost ([::1]:45194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eO4wb-0001z5-RG for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Dec 2017 11:59:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eO4wV-0001yz-7q for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2017 11:59:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eO4wQ-0005Im-Cs for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2017 11:59:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46854) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eO4wQ-0005Ic-8J for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2017 11:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eO4wP-0000fA-V3 for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2017 11:59:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Dec 2017 16:59: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: wontfix Original-Received: via spool by 29619-submit@debbugs.gnu.org id=B29619.15129250882488 (code B ref 29619); Sun, 10 Dec 2017 16:59:01 +0000 Original-Received: (at 29619) by debbugs.gnu.org; 10 Dec 2017 16:58:08 +0000 Original-Received: from localhost ([127.0.0.1]:55535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eO4vX-0000e4-Tj for submit@debbugs.gnu.org; Sun, 10 Dec 2017 11:58:08 -0500 Original-Received: from mail-wm0-f47.google.com ([74.125.82.47]:36468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eO4vW-0000da-CY for 29619@debbugs.gnu.org; Sun, 10 Dec 2017 11:58:06 -0500 Original-Received: by mail-wm0-f47.google.com with SMTP id b76so10311349wmg.1 for <29619@debbugs.gnu.org>; Sun, 10 Dec 2017 08:58:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Dwz0bqXhHDMdG43bqz3ZlrdmyVaK6WHiHMrmdU3Hqpw=; b=SMpipXJL7n6YR5E5+kvTaXOk0QWjgPhk34zesqWaPKBF8smC5MbCRxcQZdGxay7F6z +EZpxJZD/OPDIL9co+Vy1Wy5FkVBwXDv9c+sJOlm5mPNr76TuikEweavlK8RXJ6eUWSv MPrGDHecPdDNBpAB8Q6hiCjPafevVQ00a2rOrPuEwVPAgHB4enPkZN9QONV1PqfUh6gM 8pbTjp4lC4z2e/k4wKxjMpjS4jvbT1A61Kw92V7LMXYhA4cNP7fsJrHfOg/8++hx9rPw 8EsXhwa3qOQUpqBnimF6P7a84rvrPik8A4yNL4uvZrY3CcMtk5XndjoMBPutU0q0jHjb dZpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Dwz0bqXhHDMdG43bqz3ZlrdmyVaK6WHiHMrmdU3Hqpw=; b=cU6UEXLw0yzb6XQqVBdRiFtzRD0NUzBrGinuA41xtEfIQcTGchoOi5Vn+rL7yXOvQ3 crvnkFGijQhYjtIdv22MkWVdfdCGcPOQL1PoW42OaMzFHaw6dMOi6E1EN2I6Qoac11ur Dvk8f5V1YKfHEThjRBTf6vGhqYOzB2cYC+gaeNH1+GP4DblmkRnMHTgF5AF6DDDRRcPv W6kjnw+awg0dhOhCcaqVs/iGKTuVHy/FDT7BESQ2wdVBZ9viqSXbjG1CuQd8ZCIYGFPX XEUvTkCkJJDuxO/7sdByYbpzIJavlxsLHimyEuyOujFAmkqYwanF6zYC0dGB5O2iguMs MXug== X-Gm-Message-State: AKGB3mKC6/Ro9FMeMKKvFnZwY7D1b0NYkGOkoXrltloprSLcoiM0vJon 8m5fNMnxp5pcRmI40nCyzTbWd+CC X-Google-Smtp-Source: ACJfBovgClkoQvvhZWylWAJqAJslHBMEdGHr191s7Cjej9aQ+vVEUIHbhmqtJjqLrGu+xUh03ZLKMA== X-Received: by 10.28.131.73 with SMTP id f70mr7012963wmd.153.1512925080257; Sun, 10 Dec 2017 08:58:00 -0800 (PST) Original-Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id f90sm7121294wmh.12.2017.12.10.08.57.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Dec 2017 08:57:59 -0800 (PST) In-Reply-To: Content-Language: en-US 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:140903 Archived-At: On 12/9/17 7:52 PM, Ray wrote: > 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. That's fine, actually, and as designed. As long as the different global identifiers can be represented uniquely as strings (but using text properties for e.g. a local variable at point is good too). > 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 So it doesn't actually let you choose? Only supports the identifier at point?