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: xref-find-matches and stuff Date: Sat, 09 May 2015 14:58:44 +0200 Message-ID: <87twvlj4aj.fsf@gmail.com> References: <5546DD4A.2080709@yandex.ru> <87r3qvnld1.fsf@gmail.com> <5548E08A.4090305@yandex.ru> <87mw1jndul.fsf@gmail.com> <554964CE.3040809@yandex.ru> <87oalxn756.fsf@gmail.com> <554AAD41.6060506@yandex.ru> <87vbg4lgn6.fsf@gmail.com> <554CB069.8090002@yandex.ru> <87sib7j9yf.fsf@gmail.com> <554CE8B2.7080408@yandex.ru> <87fv76kj0s.fsf@gmail.com> <554D11AB.6040609@yandex.ru> <87bnhuka8x.fsf@gmail.com> <554D501C.2000408@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1431176335 6203 80.91.229.3 (9 May 2015 12:58:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 May 2015 12:58:55 +0000 (UTC) Cc: Helmut Eller , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 09 14:58:54 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 1Yr4LF-0003Yi-Iz for ged-emacs-devel@m.gmane.org; Sat, 09 May 2015 14:58:53 +0200 Original-Received: from localhost ([::1]:59225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yr4LE-0001iJ-Q4 for ged-emacs-devel@m.gmane.org; Sat, 09 May 2015 08:58:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yr4LC-0001iD-7M for emacs-devel@gnu.org; Sat, 09 May 2015 08:58:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yr4L8-0006t3-J8 for emacs-devel@gnu.org; Sat, 09 May 2015 08:58:50 -0400 Original-Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:35524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yr4L8-0006sj-By for emacs-devel@gnu.org; Sat, 09 May 2015 08:58:46 -0400 Original-Received: by widdi4 with SMTP id di4so58153061wid.0 for ; Sat, 09 May 2015 05:58:45 -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=NEJ8E5FDOKiQ6gvfCgTlxJdkaV5qlZs58TS2OkLR2os=; b=Gn8+lol1k+NWOmhWbqCaIGpWTD5haXNFkEycq2HP5QG02huYLpXTB6p0r5HU4iVO8L UAnCjjjPGVAn4+gIIDMX41FPs+fSvFWJPVsx2z1yVVU7BdjeAgbmJWcQef3jiXGyasNC teusFM56piDTIA/iJWKBSdZ3sdpF+HtfTMZPukBVmd93Tm1RDawIonk3SYIS4tK362zK cmH2InRZxLB0qBuJTo4wf+iXLUmVbofdrNrbyAxIHMuVRFdnruNUnL9GYcPxdl3Cpnta NVSCK7N/HqG+vlgcvVO/raAxH5O3YusmtUApUlvM7pGBBpjsPmE/l2XZlMpvyo1F56xW QBHw== X-Received: by 10.180.105.233 with SMTP id gp9mr6006888wib.83.1431176325595; Sat, 09 May 2015 05:58:45 -0700 (PDT) Original-Received: from localhost (dhcp-077-251-128-242.chello.nl. [77.251.128.242]) by mx.google.com with ESMTPSA id l3sm3717611wik.16.2015.05.09.05.58.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 May 2015 05:58:44 -0700 (PDT) In-Reply-To: <554D501C.2000408@yandex.ru> (Dmitry Gutov's message of "Sat, 9 May 2015 03:09:00 +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::22a 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:186362 Archived-At: >>> Dmitry Gutov on Sat, 9 May 2015 03:09:00 +0300 wrote: >and that doesn't involve manual management of backends, IMO. I also hope not. > Using one backend at a time would mirror the mechanics of > completion-at-point-function, It works for completion because you can reliably disambiguate from context which completion to use. C in C, Python in py, files in strings with "/" in them etc. With xref context is often unrelated to where you want to jump and, thus, is orthogonal to the selection of the "best" backend. > major mode authors thus far (just use `add-hook'). Asking a major > mode to make a decision whether it will augment their results with > etags, seems improper. No. Major mode just defines one backend. The end user defines a list of backends to be used simultaneously. > The quality of Imenu indexing is usually pretty low True, but it does a good job for me. > Multi-language projects are an interesting example. But if there are > no references between the source file in different languages Yet another argument for prompting on M-. by default ;) > Personally, I'd just make a "switch to another project" a separate > step here. That's the same as picking a backend just before the jump. Could be, but I hope for a better UI. > It's not ideal, no argument here. However, being unavailable in > buffers without TAGS, or in some languages, means it can be safely > skipped in those circumstances. No, it cannot. That's the main point. If I am in a non-tagged file I still want to be able to jump to my tags. >> The above is also the order that I would like to have in my backend >> list. > I'm pretty sure Imenu can't be the default backend to use. And you were > proposing to show only the results from the first backend in the list, right? As an non-ideal alternative, yes. I might be quite happy with being able to rotate backends during the minibuffer completion. Vitalie