From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: progmodes/project.el and search paths Date: Wed, 12 Aug 2015 17:36:13 +0200 Message-ID: <87egj8y0wi.fsf@isaac.fritz.box> References: <55BE209F.1000009@siege-engine.com> <55BE509B.2080307@yandex.ru> <55BEC1B5.6060204@gmail.com> <86twsgfiuc.fsf@stephe-leake.org> <87mvy2kjxa.fsf@esperi.org.uk> <86si7t11li.fsf@stephe-leake.org> <87lhdkzmdv.fsf@isaac.fritz.box> <86pp2wzcaa.fsf@stephe-leake.org> <877fp3z8i7.fsf@isaac.fritz.box> <86bnefyu0b.fsf@stephe-leake.org> <87k2t0yfz9.fsf@isaac.fritz.box> <86tws4wrar.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1439393806 31194 80.91.229.3 (12 Aug 2015 15:36:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Aug 2015 15:36:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 12 17:36:34 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 1ZPY4s-0002yf-Iq for ged-emacs-devel@m.gmane.org; Wed, 12 Aug 2015 17:36:30 +0200 Original-Received: from localhost ([::1]:39148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPY4s-0000T0-34 for ged-emacs-devel@m.gmane.org; Wed, 12 Aug 2015 11:36:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPY4n-0000SR-H2 for emacs-devel@gnu.org; Wed, 12 Aug 2015 11:36:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPY4h-00081t-F5 for emacs-devel@gnu.org; Wed, 12 Aug 2015 11:36:25 -0400 Original-Received: from randomsample.de ([5.45.97.173]:42713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPY4h-00081C-6A for emacs-devel@gnu.org; Wed, 12 Aug 2015 11:36:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=34QLoW6iU+Nf8V6JwHgTJThIEoMXtRd4xkXM5qWe19I=; b=Xtq4tjoBKkXRoUSDiQ4txtOnThe7d7MoOVbmCcmtOqmHHHk8HWyp9kASxM3eqtatLksAxHi8is2Unlg4pFMmgXKXUFakL/IE7YYDWm8igZGc5s76A7cz6PvXMT/hf8Kb; Original-Received: from ip4d145d5e.dynamic.kabel-deutschland.de ([77.20.93.94] helo=isaac.fritz.box) by randomsample.de with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZPY4f-0008SM-NW; Wed, 12 Aug 2015 17:36:18 +0200 In-Reply-To: <86tws4wrar.fsf@stephe-leake.org> (Stephen Leake's message of "Wed, 12 Aug 2015 08:49:00 -0500") User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.4 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.45.97.173 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:188760 Archived-At: Stephen Leake writes: > David Engster writes: >> This also applies to the most important feature (at least for me): >> show all definitions of 'foo' that are currently in scope. EDE has no >> notions of symbols, scope, overloading, methods, etc. > > Yes, I'm beginning to realize that. Semantic provides those things. And > it can use different backends, so it can serve as the Emacs standard > interface to such things (although I'd want to make significant changes > to use it for Ada mode). > > In that sense, Semantic competes with xref in the same way EDE competes > with project.el. There is some overlap, especially in the GUI area for presenting references. But at least I would be happy to give that up in favor of xref, since CEDET was always planned to be more on the backend side of things, and getting the GUI right is nasty, and maintaining it takes a lot of time I'd rather spend elsewhere. So I'm happy that Dmitry is working on this (also with maintaining company-mode, which IMO should become part of core Emacs rather sooner than later). With respect to project.el, I'm still not sure where this is going. >> It gets much more complicated when you're not only interested in >> definitions, but any occurance of a symbol. For instance, you want all >> places where 'foo' gets called, but not any 'foo', but the method 'foo' >> from class 'bar' and not from any other class. > > Right; that's name resolution; best done by the compiler. Yeah well, we had that discussion. I hope I find the time to work on that. Currently, there are more urgent issue, like getting CEDET mergeable again after the switch to git and the extensive EIEIO refactoring... >> All this stuff is highly dependent on the language you're using. > > The backend may be, but at the API level, there are some things that all > object oriented languages support: > > - Search for all implementations of this method. > > That's the language used by elisp cl-generic and eieio defclass. I > just made this the default behavior for xref-find-definitions. > Although that's not tested on eieio classes; I'll add that to my > list. > > In Ada, it's called "functions that override primitive operations". > > In C++, it's "functions that override a virtual function". > > The terminology is different, but the underlying notion of runtime > dispatch is the same. > > We might want to customize the menu entry depending on the current > programming language. As always, it is more complicated in C++ (overload vs override, namespaces, argument dependent lookup, etc.), but currently I don't worry too much about details. Getting the usual dispatch right would cover a lot of ground. > - Search for the parents of this type. > > "Type" is the Ada word; other languages use "class" here. > > - Search for all functions that overload this one. > > Ada and C++ (at least) support this. > > - Search for all references to this function. Yes. > In C, these searches are simpler; the first three only return one > result. Aah, the joys of ANSI C. Our parser is actually pretty good for that. :-) -David