From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Xref completion Date: Sun, 6 Dec 2020 13:00:11 +0200 Message-ID: <4c25c3e2-4589-5036-9795-75d139e6b6cf@yandex.ru> References: <873617ets1.fsf@ambrevar.xyz> <878sazzsw5.fsf@mail.linkov.net> <7593e751-cff0-7c1a-7d4c-f927a16c07c9@yandex.ru> <3b255b14-6494-99dc-1e78-9607e0d1fcd9@yandex.ru> <87tut351ea.fsf@mail.linkov.net> <9bbe9827-8e96-e45c-2e0f-23a4fb5aea33@yandex.ru> <87pn3q8ulz.fsf@mail.linkov.net> <7e7e6923-851f-c1c0-4816-d84debe6570b@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1799"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 To: William Xu , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 06 12:02:25 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klro8-0000L1-E3 for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Dec 2020 12:02:24 +0100 Original-Received: from localhost ([::1]:55294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klro7-00058b-Eh for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Dec 2020 06:02:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klrm5-0004Xc-G9 for emacs-devel@gnu.org; Sun, 06 Dec 2020 06:00:17 -0500 Original-Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:33980) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klrm3-0007JS-77 for emacs-devel@gnu.org; Sun, 06 Dec 2020 06:00:17 -0500 Original-Received: by mail-wm1-x32c.google.com with SMTP id g25so7622379wmh.1 for ; Sun, 06 Dec 2020 03:00:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=7ERhNfFjXw9/Mpy/wxqZETH+GT4FA7J4mkwfcGvjemU=; b=N30Nrloylz8M/kTllJnLE5Vx1V42rdPITUi1AEd37qar4Y6sIU9DpPbHr7llsJTWRo tbWjJfmvClvtwcuOsil88GcBnoVk6OrLaryomLNbz0Rjqi014iUAYZAj16IoZFRKBxTG DV1gJfz2xU4PHc5wsqznGm5Lm/k1VOyc3LZmm+lwFw+epN1KR3HRrek5cH4nBGbhqF7w /hepN4YFdXb45KQT1xT8z8CnNeuik2uO2XGPwasKxJvFW21lvbg+NFPHA+j+AFhIE6UR WDpR4XtbNwkUpxT9DloP/tzuWEow0cPzEZ2ucaja+UEkwBG2dppoJwi0pvwi56bS67se u47Q== 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:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7ERhNfFjXw9/Mpy/wxqZETH+GT4FA7J4mkwfcGvjemU=; b=LTUli1Z8Be8T/TMDbxA93MH1lUU/p6SvwBLWvFhCCvrul+hHfGoHToR0FAYo59/N0S H/mTUDV4o++2GrBWtfJgqwptnBezEPLek3xE//rCym2+v7Wv+yF834sW4pGDVjnDE/4U YfDVqZ1q0thZPINvg4gV8RLizNYmZFG6LdboSYEt8hrfaUB4ZD4X1p/VCOjne50EFDAf N0kaZuX0vRe9NmRXy9j4xtbBFBhayDIk9Dw1++zMI2lJhJfnj5ON54quz1mRQl4ihz9s dFxn3hYnjmaDl3+Ef8xNNlUzFnOLjaupqn3M4GZ+8NMZGX0xV+/+QXeOQNQLEVM8781H Ko0A== X-Gm-Message-State: AOAM533EnO0oawZGf7ci1/1uvj5tRWJFpnbCD7001gCdeJQMN0FJguv2 Zkt0nFQAjxva91n+XAYAfFRGcF4z1Jkq1OT4 X-Google-Smtp-Source: ABdhPJz7T4Oi/0NfDQ2IArTFX8J5PYf5ImCt0z3PdAUJ5yozfTjR4vE2k2qeKyK71V2aHicCfj5Lkw== X-Received: by 2002:a1c:7318:: with SMTP id d24mr13402202wmb.39.1607252413693; Sun, 06 Dec 2020 03:00:13 -0800 (PST) Original-Received: from [192.168.0.4] ([66.205.71.3]) by smtp.googlemail.com with ESMTPSA id a9sm10856692wrp.21.2020.12.06.03.00.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 06 Dec 2020 03:00:12 -0800 (PST) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:260421 Archived-At: On 06.12.2020 10:30, William Xu wrote: > Dmitry Gutov writes: > >> Of course, in the end it depends on each backend to put useful into >> into summaries. And in the case of etags, that depends on how the >> definition is written (that the identifier is not alone on its line). > > You are right. It is backend specific. So it makes more sense, showing > the summary by default as you are currently doing. > >>> However, at the moment it only shows the same summary info for each >>> line, which doesn't seem really useful: >>> /foo.cpp:40:Foo >>> /foo2.cpp:42:Foo >> >> Which backend is this? Also etags? > > Eglot with ccls. Sounds like something to improve in either eglot or ccls. Seems like. It could also be a limitation of the LSP protocol (looking at https://microsoft.github.io/language-server-protocol/specifications/specification-3-15/#location, it doesn't have a field for "line text"). But if so, maybe Eglot could visit the files preemptively and extract the line contents. Unlike some other operations, there's unlikely to be many results in that list, so it shouldn't take long. It seems to be trying to do something like this already: https://github.com/joaotavora/eglot/blob/master/eglot.el#L1927, maybe file a report for this particular case.