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: Sat, 5 Dec 2020 23:02:30 +0200 Message-ID: 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="30630"; 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 Sat Dec 05 22:03:58 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 1kleik-0007r3-F6 for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Dec 2020 22:03:58 +0100 Original-Received: from localhost ([::1]:39436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kleij-0007vt-GA for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Dec 2020 16:03:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klehU-0007UV-1q for emacs-devel@gnu.org; Sat, 05 Dec 2020 16:02:40 -0500 Original-Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:50947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klehR-00046E-LS for emacs-devel@gnu.org; Sat, 05 Dec 2020 16:02:39 -0500 Original-Received: by mail-wm1-x32c.google.com with SMTP id c198so8282568wmd.0 for ; Sat, 05 Dec 2020 13:02:35 -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=WH1YUJHn8G7LqspNg+UNnFDiP8CABVeLRtFmPRhWZmE=; b=FUQ4LeXzPQeWn/InHTpwQjKeGclQg+tFe0rN4SEt4XdTaLX8a6mT2rYtcsa1S7sUM8 qOY2MtArmvp8C/Apim79FZ9x1pVPHUmaam/C+1XV0WuckcL47zceto2CwiXtJyBGc0Da PZyUPTYaapbYyM9PjGJBwqwnLO446z9P0hO0xSnIIeI22heyhjLXdcGnhvBFQQ62X0GD B2/yIajStB1clDROLCeKpJuTtWLH4pg3bT4FMKxBcaOBWLQ2Nemz/gSNLqzbKVbt1+cR C40F5DXlvgcoJMLaZv1NZQFN6vHkQci6iRMOSZSpZIF9KgJbkcd+VGfRH79stsDwBkXr WGlA== 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=WH1YUJHn8G7LqspNg+UNnFDiP8CABVeLRtFmPRhWZmE=; b=ZwzD9C4yi/15PmVzlFYs+imoFe9J/G3W3D/ooFgO4zIV7uzX16U5YrO7F7kVvQkU3E IWs6Zoh5OzZE8/4EnYD9AL38DCNRmeTwkKzbqk6lkJlQgwrdsP0Ue4g27MHTSAx9oAVn wsfEMSqmzPcQ3U51riGx9fjZ3KUYhs+uwt7KBVzF3RIskEeCGQoBjyock47SZrd6UmWq +z6qLcKeg5NREmINDqqHElk5+sVY/NM2m9NQgH6j6mAtxtt0waZh0z4oXTSJ2vxwPxup oe2lldLFJJOBhZCpCl2qRWkNQ68Z7egceojlW0TrHOp9APFflnoG/G94wfC/U9QHmEHv vo1w== X-Gm-Message-State: AOAM532BYsnUq4tIKKDvVLSC5Eatw36faUzDKFgt0VQNgDFflM+T6Ra0 rvHgQflhwaDgwbQUQ4MsA9umahGynZWFCW8B X-Google-Smtp-Source: ABdhPJwZ3D0Kn1F8d6wy0s3YwJFCOK9uL7B66aXZ1riyyjVh+HXbrzS8Qsze5vtK4o2hITQMzaLJpw== X-Received: by 2002:a05:600c:58e:: with SMTP id o14mr11129928wmd.47.1607202153620; Sat, 05 Dec 2020 13:02:33 -0800 (PST) Original-Received: from [192.168.0.4] ([66.205.71.3]) by smtp.googlemail.com with ESMTPSA id i5sm9277411wrw.45.2020.12.05.13.02.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Dec 2020 13:02:32 -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:260390 Archived-At: On 05.12.2020 14:21, William Xu wrote: > Dmitry Gutov writes: > >> I've pushed it now with some changes, hope you all like the result. >> >> Shortening the group part (in most common cases) is among them. >> >> Also added some highlighting with corresponding xref faces. It now >> looks closer to Pierre's original screenshot. > > The result looks nice. Thanks. >> Removed the bit of logic that hid the summaries when they are >> technically unnecessary because in my testing it made completion >> slightly less useful by hiding information (sorry). > > If the summary contains different info, like the actual line from the > group (in case it is a file), that may be useful to show it, for > example: > > /foo.cpp:40:struct Foo : Bar > /foo2.cpp:42:struct Foo : Foo2 That's how it usually looks in my testing, with the etags backend. E.g.: Possible completions are: dispextern.h:2703: int vpos; indent.h:29: EMACS_INT vpos; window.h:97: int hpos, vpos; (After I try to navigate to the definitions 'vpos' from xdisp.c:1499). 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). > 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? > Or one can also just add this info into the reading prompt: > (format "Jump to definition of `%s': " summary) I suppose it could be a special case, but we'd have to pipe through the initial input as well (it's not currently available). So hopefully there is some better solution.