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 03:12:43 +0200 Message-ID: <7e7e6923-851f-c1c0-4816-d84debe6570b@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> 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="25616"; 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 Cc: William Xu , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 05 02:14:07 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 1klM9H-0006aE-5K for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Dec 2020 02:14:07 +0100 Original-Received: from localhost ([::1]:57342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klM9G-0006wb-4m for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Dec 2020 20:14:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klM83-0006TR-28 for emacs-devel@gnu.org; Fri, 04 Dec 2020 20:12:51 -0500 Original-Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:34241) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klM81-0002O3-7V for emacs-devel@gnu.org; Fri, 04 Dec 2020 20:12:50 -0500 Original-Received: by mail-ed1-x52c.google.com with SMTP id dk8so4848498edb.1 for ; Fri, 04 Dec 2020 17:12:48 -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=ODody8nWp2yIKCdMopm/IazCLSet/TQVD2jWvPMFZZE=; b=FN1+QD3bhiMpuTX4JWsAMdxvQ0APnRC6Rg2YcEjoJtCWkBSQCrQ1c96FzI9/az29M7 sLQmIWXauuU5YXYZr6OUNKsfAE2W/HGsHad2/r0laAqL8VP8yH8sIx4xLA6qBhGTe39h WkvmzhxnjJTR+fhN+BOhQL+tv3Vj+i6G92kqEMwxGbnMCZpKk+FV+FnQzAz0gL3Hh4ZB 1wMz4b40Ke2r5AiXb6QPgrTttijhKk0118/BiAtBB61V8mCV6wwozqvpz9lxPVWOX+aF TiMMD/qbwsxm6WXZf3/6BXTWiQ/DSZJn4Rz3e5Y8d8pGn8qC4wBiBqQKfT7IH1SOWPT2 HAdg== 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=ODody8nWp2yIKCdMopm/IazCLSet/TQVD2jWvPMFZZE=; b=SEutVByMWGARJjVSLAGFYhpaWl2bntp/6Ls5bZ0Pdm4MgPIDqnGWOOWUXQf2ls10pG 1uoI9iOJrNHxXD0NKeLKy8jGyNSQbSDMoS+Rf8qGUdZgf48+4SN+x/pGIwCkIsLUzoN1 06MynMOycdngd3+CELBB2XB35D7YuwiMgFtkdxOE0VWMe1Y5EqSeDIciUECIzf40MvmZ lCar7g0VqrhVBRMHikAoVhhlgkvu0qmsIDNydpOdOP+vEiTdCAh8FY6coZIJqbNM3w0B rMfoG6j+Pk+1xdt7ubLcIkzTsdMKUSy03Y7JYf6GUt55ecbPMI/IEAnLKQFoU/AX73vc kB1w== X-Gm-Message-State: AOAM531YHCiauhEbzJOCroREGwLetq1+08JVKhlzrIo/SfgabosHdezY k2S0kbXQhvkGT9mRTZ5oBlXZ9dzf8cBBjA== X-Google-Smtp-Source: ABdhPJw6mdwSB48brJ3SobJhSUstvakmsE9KIuujKFikjtp9j25vMO2qcgWqHqyemCeUtMXpTtRZrQ== X-Received: by 2002:a50:fa9a:: with SMTP id w26mr10493522edr.299.1607130766939; Fri, 04 Dec 2020 17:12:46 -0800 (PST) Original-Received: from [192.168.0.4] ([66.205.71.3]) by smtp.googlemail.com with ESMTPSA id p91sm4598461edp.9.2020.12.04.17.12.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2020 17:12:45 -0800 (PST) In-Reply-To: <87pn3q8ulz.fsf@mail.linkov.net> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=raaahh@gmail.com; helo=mail-ed1-x52c.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, 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:260334 Archived-At: On 03.12.2020 23:09, Juri Linkov wrote: >>> BTW, like you created xref--show-defs-minibuffer >>> as a possible option for xref-show-definitions-function, >>> wouldn't it be also nice to do the same and create >>> xref--show-xref-minibuffer as a possible option for >>> xref-show-xrefs-function? >> >> Don't you usually want to iterate across multiple results, when the command >> is project-find-regexp or xref-find-references? Then the same logic will >> not work. > > Right, xref--show-xref-minibuffer would be not as useful as > xref--show-defs-minibuffer is. Hope to see xref--show-defs-minibuffer > in xref.el soon. 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. 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). Anybody who really preferred the previous version, please try it again with c86dc8d488 reverted locally, and maybe propose a user option for that behavior. BTW, Juri, how do you think this new function compares against xref--show-defs-buffer-at-bottom? On the one hand, it feels kinda faster, on the other, it lacks the ability to "look around" when you really need it. In an ideal world, I guess the UI would be somewhere in the middle.