From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Ludlam Newsgroups: gmane.emacs.devel Subject: Re: xref and GNU Global? Date: Fri, 21 Aug 2015 21:41:33 -0400 Message-ID: <55D7D34D.8000208@siege-engine.com> References: <87d1yjfy6d.fsf@petton.fr> <87y4h7klht.fsf@petton.fr> <86pp2gstq9.fsf@stephe-leake.org> 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 1440207712 24400 80.91.229.3 (22 Aug 2015 01:41:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Aug 2015 01:41:52 +0000 (UTC) To: Stephen Leake , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 22 03:41:44 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 1ZSxoV-0007qC-MO for ged-emacs-devel@m.gmane.org; Sat, 22 Aug 2015 03:41:43 +0200 Original-Received: from localhost ([::1]:45101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSxoU-0001gi-F5 for ged-emacs-devel@m.gmane.org; Fri, 21 Aug 2015 21:41:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSxoR-0001gN-7E for emacs-devel@gnu.org; Fri, 21 Aug 2015 21:41:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSxoO-0008SY-2Y for emacs-devel@gnu.org; Fri, 21 Aug 2015 21:41:39 -0400 Original-Received: from mail-vk0-f45.google.com ([209.85.213.45]:33047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSxoN-0008Rm-Un for emacs-devel@gnu.org; Fri, 21 Aug 2015 21:41:35 -0400 Original-Received: by vkd66 with SMTP id 66so38150789vkd.0 for ; Fri, 21 Aug 2015 18:41:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=pAG/5wcBG67fjnh2Od1vmRl6ZyJYK+LwzM3u4UggiTw=; b=eqW27ST5HRl+ssboTINk68WtjRybhBh0Vf7OqmKqTP+M3elan4DDA8Qb5OOZaW1xU5 4A+/8kOtKq9owPNG16ZolEkMzTpEw4z5S8ZZPLnlfntJKTypG59ZpFOGbW9blZaRHm1x fWYR1PlDMmcbww0OU3qye/rvDq+ywR7IQt+ChgYew1Joh5P/x/ePjR/dZC5HVO84uk03 e3FeX49ZhjiAMQdteEas9V6LKKDQh6IKBFPLKCYuZf+i7LT8c6Oyn4Qsw9z8+V34inaM s6ivjB5fzfPJTOasgnx/KFPBrLPGuSNENdWeGWaY2ME8pDY9x21SMFTscwlscyqtqsjb HGWw== X-Received: by 10.52.167.105 with SMTP id zn9mr14174476vdb.83.1440207694976; Fri, 21 Aug 2015 18:41:34 -0700 (PDT) Original-Received: from [192.168.1.202] (pool-71-184-198-118.bstnma.fios.verizon.net. [71.184.198.118]) by smtp.googlemail.com with ESMTPSA id l2sm2573188vdi.22.2015.08.21.18.41.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Aug 2015 18:41:34 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 In-Reply-To: <86pp2gstq9.fsf@stephe-leake.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.213.45 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:189060 Archived-At: On 08/21/2015 08:37 AM, Stephen Leake wrote: > Nicolas Petton writes: > >> Stefan Monnier writes: >> >>>> I find GNU Global to be far superior to etags or ctags. Is there any >>>> plan to have support for it in xref.el? (Or maybe there is and I missed >>>> it). >>> >>> Yes. IIRC the plan is to wait for Nicolas Petton to start working on >>> it. >> >> Hmm, right. First I'll have a look at what semantic & xref already have >> to offer :) > > One approach is to use what semantic currently has for gnu global; > that's in emacs/lisp/cedet/semantic/db-global.el. I'm not clear if all > of that is accessible via the xref interface yet. > > I suspect semantic/db-global.el provides the same functionality as > ggtags, possibly without as much UI; the current design goal is for xref > to be the UI for semantic cross-reference features. Global support from cedet/semantic comes from a few different places. The core interface is a few calls in cedet-global.el. Helpful for getting some raw data. The semantic/db-global.el is for using GNU Global as a database backend. Stand-alone, it is not useful. With Semantic and it's generic database system, it provides a way to find symbol declarations across a project. You would use this if you wanted to write or use an existing tool using semantic's tag finding APIs to find declarations. semantic-complete-jump is an example that uses that. The nice thing about semantic's database system is it can mix multiple tools together, for example global for project wide, and Semantic's parser system for buffers you are editing that global doesn't know about yet. semantic/symref/global.el is another place with global support. This one is pretty simple as far as running and parsing output for use with the semantic symref searching system. This tool is useful for finding references, and also providing other tag information along with the different hits. Eric