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 15:46:00 +0200 Message-ID: <87ioc1j23r.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> <83a8xep450.fsf@gnu.org> <87y4kyhqyk.fsf@gmail.com> <83oaltoplj.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1431179194 15381 80.91.229.3 (9 May 2015 13:46:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 May 2015 13:46:34 +0000 (UTC) Cc: emacs-devel@gnu.org, eller.helmut@gmail.com, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 09 15:46:20 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 1Yr55A-0003KC-D2 for ged-emacs-devel@m.gmane.org; Sat, 09 May 2015 15:46:20 +0200 Original-Received: from localhost ([::1]:59350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yr559-0006ck-P8 for ged-emacs-devel@m.gmane.org; Sat, 09 May 2015 09:46:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yr54x-0006ce-9H for emacs-devel@gnu.org; Sat, 09 May 2015 09:46:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yr54w-0005gF-9o for emacs-devel@gnu.org; Sat, 09 May 2015 09:46:07 -0400 Original-Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:33727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yr54s-0005g1-Bw; Sat, 09 May 2015 09:46:02 -0400 Original-Received: by wief7 with SMTP id f7so54610413wie.0; Sat, 09 May 2015 06:46:01 -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=hySQrs4Ag9aB9Hu0Zvk57pZsefOpQuDLPblq3IhHapQ=; b=AMtxIFCOASnNDzglUu/p94nvD5gwXilRzoGavujTa8Sv/lolPfMClkVvzSvPRC8bQl 78D6jpB6Edi5ox8U/xHP9e4HNA4IoVGXLQ3BKJFmmlXSN8fd4yFfSlLi2vPscbmda/Kb eCIDznDjt9IFVAIiQniG9CP+Y92NNb3IdsU7GH5vJk5v695dUGEuC4BrBQF6tcoDi1DU SQBr16YdDvH4ojV4lfNDhf8LnnHsu0Dr39W+x2f2vwc9ZvBT2lGp/RZeX3v5Gx+rvALz DBUBdRPsmL9HOfJZ+kqhBetkJFthiVebDttDTVEJ8y5BJe6xEZfsRrEo7T7Sxa0gFlw9 bMBA== X-Received: by 10.194.62.132 with SMTP id y4mr5130578wjr.91.1431179161721; Sat, 09 May 2015 06:46:01 -0700 (PDT) Original-Received: from localhost (dhcp-077-251-128-242.chello.nl. [77.251.128.242]) by mx.google.com with ESMTPSA id xb3sm10278945wjc.38.2015.05.09.06.46.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 May 2015 06:46:00 -0700 (PDT) In-Reply-To: <83oaltoplj.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 May 2015 16:19:36 +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:186367 Archived-At: >>> 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. >> You and other people seem to assume that given the context of A you >> 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. 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. >> If I am in an C++ tutorial which is not tagged (but has Imenu). Assume >> no symbol at point. How can xref know if I want to jump to a symbol in >> this example file (imenu backend) or a C++ file in my current project >> (tags backend)? > Who or what _can_ know that, except the user herself? Exactly my point! > 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. > 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? > 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. >> 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 ... Vitalie