From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.devel Subject: Re: Bad moves with xref-find-definitions Date: Sun, 26 Apr 2015 18:01:54 +0200 Message-ID: <87mw1unaj1.fsf@gmail.com> References: <87h9s6c27z.fsf@gmail.com> <87zj5wnlyt.fsf@gmail.com> <87zj5vm8h3.fsf@gmail.com> <553D022D.50508@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1430064446 1035 80.91.229.3 (26 Apr 2015 16:07:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Apr 2015 16:07:26 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 26 18:07:21 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YmP5U-00078J-7Y for ged-emacs-devel@m.gmane.org; Sun, 26 Apr 2015 18:07:20 +0200 Original-Received: from localhost ([::1]:51331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmP5T-00011J-LW for ged-emacs-devel@m.gmane.org; Sun, 26 Apr 2015 12:07:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmP55-0008NG-VK for emacs-devel@gnu.org; Sun, 26 Apr 2015 12:06:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmP0H-00007B-Ba for emacs-devel@gnu.org; Sun, 26 Apr 2015 12:02:00 -0400 Original-Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:37719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmP0H-000074-2Q for emacs-devel@gnu.org; Sun, 26 Apr 2015 12:01:57 -0400 Original-Received: by widdi4 with SMTP id di4so65980595wid.0 for ; Sun, 26 Apr 2015 09:01:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=ObFVVL3tSrlF1Ya/x44EUmSu7digaU9nnYHfhDIUqi0=; b=KGd/ioOiYG7qvlYqy8WD6K5Y/isbkmiX1PRdkz4JeuWgIWvGduUbu8alGCkSvATi8Z E3h47qIGL5M4OWhuZgClvzQzeY6LLa5q7F5uhKquSrygoaUPsfZipyWGS6stAy819EzB vlhHa0cJFcLd7da931aLuJ9e3LQ2yego1oc26CcMj8+pX1HvI3nWgWOhNjHL4R3atwI6 kl+DGfbnPQjmCSFp7pKbM1VgnIRnBWcqf/f7u+ne2vBQmRENKj/vlAiYC63i6NPsM2QO 5mmDAusJdZQ1DT1IT1IdSI1OG68ZRXbPALMYfq/Ppmm67qzLu/WSsDrPgFpQWyxBYEer 3B6A== X-Received: by 10.181.13.16 with SMTP id eu16mr13824755wid.10.1430064116092; Sun, 26 Apr 2015 09:01:56 -0700 (PDT) Original-Received: from localhost (dhcp-077-251-128-242.chello.nl. [77.251.128.242]) by mx.google.com with ESMTPSA id ha4sm7857417wib.0.2015.04.26.09.01.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Apr 2015 09:01:54 -0700 (PDT) In-Reply-To: <553D022D.50508@yandex.ru> (Dmitry Gutov's message of "Sun, 26 Apr 2015 18:20:13 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185916 Archived-At: >>> Dmitry Gutov on Sun, 26 Apr 2015 18:20:13 +0300 wrote: > On 04/26/2015 02:31 PM, Vitalie Spinu wrote: >> What do you currently do if there are multiple matching definitions of >> the "thing-at-point"? Prompt? > Show them all in the xref buffer. But if the backend is smart enough, it will > include the disambiguating context information as text properties on the > "thing-at-point" string. Aha! I see. Would be nice to be able to flush those into some familiar interface - IDO, HELM or at least grep-like buffers (compilation buffers) so that one can use M-g n, M-g p without visiting the buffer. >> As to prompting, if you try to accommodate multiple backends, then >> merging completion candidates from multiple backends is a simple task >> when you prompt. > Not if you want to avoid duplicates. ... > So you can simply call `delete-dups' on ... ^^^ cannot? What's the exact problem except abandoning lazynes? Naively I think about it like this. Gather all candidates. Delete-dups. Then take backends in turn and see which one contain the reference. If unique, use that backend, else use *xref* buffer. I personally never had problems with too many candidates, so "being lazy" is completely useless feature to me. I am also not convinced you are gaining much speed here. Each backend has to operate with its own list of candidates anyways. Vitalie