From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gabriel do Nascimento Ribeiro Newsgroups: gmane.emacs.devel Subject: Re: Consistency for xref-show-{xrefs,definitions}-function Date: Sat, 16 Jan 2021 15:35:51 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18069"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 16 19:52:05 2021 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 1l0qg8-0004Xu-Aw for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Jan 2021 19:52:04 +0100 Original-Received: from localhost ([::1]:45936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0qg7-00082U-EW for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Jan 2021 13:52:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0qfC-00079V-SV for emacs-devel@gnu.org; Sat, 16 Jan 2021 13:51:06 -0500 Original-Received: from mail-bn8nam12olkn2046.outbound.protection.outlook.com ([40.92.21.46]:13617 helo=NAM12-BN8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0qfA-0003Ia-7d for emacs-devel@gnu.org; Sat, 16 Jan 2021 13:51:06 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fWgcbN0IXNaUVRa5iawjdt89jPkg1O4oFpIaO5+44dvr1pzgZ1eUWIPCHkitNleFeGBt4kS1xus3Wt0FhStjLFS60Nj0fyQ/6K/A6H2K9MR7Rh283P4bcvkE4rCgWoNIkTeAw7INHSpl82z57DQfuYqv/PKkebti5Ey2kbZOYr3Ecjcv2jE/6wmPfEITdDWYPXX7dQMoVOC5IkaW7W+YGzv+a8Ci1+TKxWGSdy4m1aWYnKh5xoVB3oar6uPQic8/So4zcA0h8f4ZvqrNV4P7xJuNs1d9/rzdNIZEWXhDmt8Oy/D/+UwdmYoMF2+qWWX+kgOOqUiBOfOEKsxsByD4wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BZz5iDlKUhUNLFSYugJsnffTmq8eVswpKrmrTjW+Sdk=; b=LaeEG9fTxNaN9AlNcg8ZV3zEHDx2YwKk0ieMT41FfwLDyGYcTj0m472wZY+Yu/uqFbrfSUB2wRMEQZ9Y08pZsHxFfFMF9wwvn7uig56gOPVRbVmUeidVJKNe2HhR3XsFYV9q6TiQ9KjsfBkGcZB80/aGbmeYGhVIfLd/Sem+x7NCum7c06v7OF3ScyQm5dRO0696Gd1kOoULI9e3wGHLNM1TWMKWfqed5szXj4SzSpveZzomJpBYTNpEs+dAt0tFmrKD8OO9wduHtTfLz5U7mPPOQCCiKXsRwRn+mFG/TODKuhZsyKkrWOy8MC/i9ayc/5B9vqMtYaZYhK8MkMv1dw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BZz5iDlKUhUNLFSYugJsnffTmq8eVswpKrmrTjW+Sdk=; b=tpFg2gWbouf//ItBPE6IZlDG4RIroD84gKGEmj1ltSkqSsidjBx03iEEWC2veQANeryqgDcId3uiTtIPQmJSPlfkP8T4bRfhWleT2o4olxreRZCBzP5OscLhgZlqXAgsBwTNjkM+X/jRhsbwzQsAATifxWW1ZQp7ujEs+Q0WoQpOzMOPDNVVcUFGhsqNxNBkG+xFqT4ZtSmZvHId00CVYpDGN7eWuw1hUGkLjNtsJ/Qh3W5+NmUigwu3RSU9ak6ndI4wWdZ6du8fhcC0ZsXJAVfpIbeZEouxGEh9c27CUURiNutvAEcZu2WjCCkQZYg41Cw7Cfvu1ThCyPbEzyFaXg== Original-Received: from DM6NAM12FT051.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc64::48) by DM6NAM12HT192.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc64::406) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.7; Sat, 16 Jan 2021 18:35:59 +0000 Original-Received: from CH2PR01MB5879.prod.exchangelabs.com (2a01:111:e400:fc64::4b) by DM6NAM12FT051.mail.protection.outlook.com (2a01:111:e400:fc64::105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.7 via Frontend Transport; Sat, 16 Jan 2021 18:35:59 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:16FE3419F152B1F22C93EF44138B79DF0CBF666C742F00EBD6BBE468CCA0FBEF; UpperCasedChecksum:2981A51D9EB1935684A6FD3EC100B2C09E316FB7A864255A889076EFDEE7F59B; SizeAsReceived:7557; Count:45 Original-Received: from CH2PR01MB5879.prod.exchangelabs.com ([fe80::d51d:8cbe:370a:39ac]) by CH2PR01MB5879.prod.exchangelabs.com ([fe80::d51d:8cbe:370a:39ac%7]) with mapi id 15.20.3763.012; Sat, 16 Jan 2021 18:35:58 +0000 In-Reply-To: (Dmitry Gutov's message of "Fri, 15 Jan 2021 19:20:34 +0200") X-TMN: [qLPrDnnQ+F1LHqKcRIcNYAcQf++R0LfLKSRRyYub7gowtaUPq1Hssr4zfWg+QxP/] X-ClientProxiedBy: CPYP284CA0041.BRAP284.PROD.OUTLOOK.COM (2603:10d6:103:81::10) To CH2PR01MB5879.prod.exchangelabs.com (2603:10b6:610:3c::12) X-Microsoft-Original-Message-ID: <878s8s91bs.fsf@hotmail.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from precision5540 (2804:431:c7f3:af8f:41c0:c93c:f169:58f1) by CPYP284CA0041.BRAP284.PROD.OUTLOOK.COM (2603:10d6:103:81::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10 via Frontend Transport; Sat, 16 Jan 2021 18:35:56 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 45 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 3613db00-11d0-4efc-5130-08d8ba4d906c X-MS-TrafficTypeDiagnostic: DM6NAM12HT192: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V/utQuEtmb1xCyvTWCQCmbglozm31V1Pi2RcOAKCa/Xc82pHai1//vlnhy35Er2LyO5udj76Ree4m4OZxTZ0wV7skrV5WI1NUzSbYyn2iGtE8b2ypLtIpfgM9LW7gGh94jnsyZ9YZ8RSePkV8+WpQsb6kVMDL5pYnPcK2dP6VlplzrCNr9EdQe20xqho60Q7tZQMQPp8TD0oBifUIpmCYV6eGax20fHEE3wN8Jj2wlbstZhwfCNaDzzz0S4EJ2Q+ X-MS-Exchange-AntiSpam-MessageData: fTQYlWn0zGD9hsq14CEvMj4H9jLBG7ue8SutkuS2A8+5ZVSMjU0Q7G5h/RYTFmb3gFOkfXBUaZiC1hj+PdLR8nKVPjUTyOGKshuwml77pFNuYAlmBb4+l2P3n3rPpJAzNz6k4weNTuhj1UHvMXQSBQ1LLevVDhAnyRxC/+WPcqkGOQl65ncBXcy5789polCHV9Y8X47kwqyF60L+uB34Vg== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3613db00-11d0-4efc-5130-08d8ba4d906c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2021 18:35:58.3603 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT051.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM12HT192 Received-SPF: pass client-ip=40.92.21.46; envelope-from=gabriel376@hotmail.com; helo=NAM12-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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:263104 Archived-At: > > Why do you want this? > > xref-find-definitions differs from the rest of Xref-using commands in > that it usually only find one location, and when there are several, > the user wants to quickly choose one of the alternatives, the faster > the better. The different options for xref-show-definitions-function > provide different solutions for that problem. > > In all other cases returning multiple results is the common case, and > you usually want to see all of them, not just one. For that, the > completing-read UI, for example, is not very suitable. Thanks for the inputs. My use case is: when inside a project, the only option to jump to a certain location is by using 'C-x p g' (which runs 'xref--show-xrefs') and selecting the desired location from the list of matches in a separated buffer. I would like to be able to select a single element from this list of matches, preferably with 'completing-read'. I took another look in the code, so I guess we can keep the xrefs functions as it is and tweak 'project-find-regexp' to be more flexible on this.