From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Bad moves with xref-find-definitions Date: Sun, 26 Apr 2015 18:20:13 +0300 Message-ID: <553D022D.50508@yandex.ru> References: <87h9s6c27z.fsf@gmail.com> <87zj5wnlyt.fsf@gmail.com> <87zj5vm8h3.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1430061649 24140 80.91.229.3 (26 Apr 2015 15:20:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Apr 2015 15:20:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: Vitalie Spinu , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 26 17:20:49 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 1YmOMS-0006bC-1f for ged-emacs-devel@m.gmane.org; Sun, 26 Apr 2015 17:20:48 +0200 Original-Received: from localhost ([::1]:51091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmOMR-0000wB-Ai for ged-emacs-devel@m.gmane.org; Sun, 26 Apr 2015 11:20:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmOMD-0000vF-Lh for emacs-devel@gnu.org; Sun, 26 Apr 2015 11:20:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmOM9-0006OA-KD for emacs-devel@gnu.org; Sun, 26 Apr 2015 11:20:33 -0400 Original-Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:35045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmOM9-0006Gx-CQ for emacs-devel@gnu.org; Sun, 26 Apr 2015 11:20:29 -0400 Original-Received: by widdi4 with SMTP id di4so72397716wid.0 for ; Sun, 26 Apr 2015 08:20:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=LxZy/2jc9O0n5ZcHnvKhyX5n5HGwCAYfbRRHp5qA+jg=; b=cSItkPVyxKfLesJU3pgd9pnVGIc2hFdS8oMNX2rHfGqhv5LL2YEyyr+nuHIJ8mnEGV oLGHoPTkb2wGcKS0VkC56td39OuIV3DBDwzarTqpz1pPa5V5nibrQ57BJ637OBBwEAh7 +pM+d5yYVwOQjwmZro3ft+XTtuMefMOw4GGT5N0WOg0d8eSsUB97mhe61nslb4D/lBF7 E0yQ2Q8AE2TkoI0rLktpJvnYIQH2dDHVNChWxU3H4GQv0iQwkFQ5pnVWaGzKhwdyrkkE uH8a72fqi4l/emqY0STl/EhK2EVMvYVGSswhHnuF2SDrbVkdPo/CUJIARyAF+R9+VKOh TGdQ== X-Received: by 10.180.74.132 with SMTP id t4mr13617203wiv.55.1430061619048; Sun, 26 Apr 2015 08:20:19 -0700 (PDT) Original-Received: from [192.168.1.2] ([82.102.93.54]) by mx.google.com with ESMTPSA id fm8sm7710857wib.9.2015.04.26.08.20.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Apr 2015 08:20:19 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0 In-Reply-To: <87zj5vm8h3.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::234 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:185914 Archived-At: 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. That kind of string (probably) can't be present in the completion table, though. > All I was trying to say is that tags are commonly useful alongside > dynamic backends. Blindly replacing tags with an even very good backend > is not the right direction IMW. Expecting from end users to solve this > problem with add-function :before is unacceptable if there are way to > fix it at Emacs level. It doesn't have to come down to users. Completion packages could take care of it as well. > 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. Currently, file opening and nagivation to the exact positions is being done lazily (which improves overall performance quite a bit). So you can simply call `delete-dups' on the xref elements when they come from different backends. > If you try instead to "bypass the minibuffer" it's > likely to be a much more difficult task. How does it make any difference?