From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: xref-find-matches and stuff Date: Sat, 09 May 2015 17:03:23 +0300 Message-ID: <83lhgxonkk.fsf@gnu.org> 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> <83a8xep450.fsf@gnu.org> <87y4kyhqyk.fsf@gmail.com> <83oaltoplj.fsf@gnu.org> <87ioc1j23r.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1431180242 30966 80.91.229.3 (9 May 2015 14:04:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 May 2015 14:04:02 +0000 (UTC) Cc: emacs-devel@gnu.org, eller.helmut@gmail.com, dgutov@yandex.ru To: Vitalie Spinu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 09 16:03:56 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 1Yr5MB-0001R4-F8 for ged-emacs-devel@m.gmane.org; Sat, 09 May 2015 16:03:55 +0200 Original-Received: from localhost ([::1]:59399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yr5MA-0001ew-V5 for ged-emacs-devel@m.gmane.org; Sat, 09 May 2015 10:03:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yr5Lx-0001ep-4M for emacs-devel@gnu.org; Sat, 09 May 2015 10:03:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yr5Ls-0002qR-4T for emacs-devel@gnu.org; Sat, 09 May 2015 10:03:41 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:37193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yr5Lr-0002pz-SB for emacs-devel@gnu.org; Sat, 09 May 2015 10:03:36 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NO300J005K5MO00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Sat, 09 May 2015 17:03:08 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NO300JKT5P7K950@a-mtaout23.012.net.il>; Sat, 09 May 2015 17:03:08 +0300 (IDT) In-reply-to: <87ioc1j23r.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 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:186368 Archived-At: > From: Vitalie Spinu > Cc: dgutov@yandex.ru, eller.helmut@gmail.com, emacs-devel@gnu.org > Date: Sat, 09 May 2015 15:46:00 +0200 > > >>> Eli Zaretskii on Sat, 09 May 2015 16:19:36 +0300 wrote: > >> > >> Then, indeed, you won't need Imenu, nor REPL backends. Till such an > >> universal tool is there, xref itself comes very close to it if imenu, > >> tags and REPL backends were automatically merged. > > > If by "merged" you mean a union of all the symbols returned by all > > the back-ends, then you have just described a single back-end that > > will satisfy our needs. > > That's exactly my point. Thank you! > > Full union is a bit too much, you can easily do better than that. I don't see why bother. > >> can infer which backend to use in order to jump to B. Unless you you > >> have an unique symbol at point in A matching B, that's impossible. > > > I'm sorry, but you didn't say what are A and B here, and what is the > > context of A. > > That was in the picture. I hope you received it. I received the picture, but all it shows is a few intersecting rectangles with labels. It doesn't explain what is A or B. > The exact context at point of A is irrelevant (it can be C++ or R) the > only thing relevant is that to A you can jump only with Imenu backend to > B only with TAGS backend. The notion of "context" is still not clear, sorry. Also, I don't understand why would TAGS not know about A. It doesn't miss definitions, IME. > > And the user then has to set up this session so that the _single_ > > relevant back-end is to be used. > > ??? In my example backends are non-overlapping. You need all of them > simultaneously. No, I need only one in each particular use case. > > And anyway, are the majority of the projects we work on tutorials? I > > sincerely doubt that. > > Common. That's just an example. Don't you create scratch buffers to try > stuff? Don't you open other projects/languages to see how stuff is > implemented when developing your primary stuff? Not every open file or buffer needs this facility. In a buffer you can simply search. > > The difficulty of making the decision which back-end to use does not > > imply that we should avoid making the decision. > > You can leave the decision to the users but that doesn't mean it will > get any easier. Either you can try to solve it for all, or hundreds of > thousands will be solving for themselves. > > > It just implies we need better methods of making that decision. > > You seem to be still convinced that disambiguation the backend from the > current context is a manageable task. Of course it's manageable! > >> I have C-. for elisp-xref, M-. for whatever is the default, M-o for > >> imenu-anywhere and I am seriously thinking about the forth key for etags > >> because inconsistency with M-. started jarring on me. > > > There's a saying that a person with one watch always knows the time, > > even if her idea of the time is a bit biased; whereas a person with > > more than one watch always confused wrt what time it is. > > I think of it more like watch + scale + ruler ... Scale and rules are worthless when I need to know the time.