From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.devel Subject: Re: unifying emacs "go to definition" functionality Date: Wed, 20 Feb 2013 07:59:06 +0100 Message-ID: <5124743A.2040404@online.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1361343542 27847 80.91.229.3 (20 Feb 2013 06:59:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2013 06:59:02 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 20 07:59:25 2013 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 1U83eF-0005NU-GB for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2013 07:59:23 +0100 Original-Received: from localhost ([::1]:49893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U83dv-0000Xk-DI for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2013 01:59:03 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U83do-0000Va-LP for emacs-devel@gnu.org; Wed, 20 Feb 2013 01:59:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U83dm-0002Wg-RO for emacs-devel@gnu.org; Wed, 20 Feb 2013 01:58:56 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.171]:58203) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U83dm-0002WI-Hg for emacs-devel@gnu.org; Wed, 20 Feb 2013 01:58:54 -0500 Original-Received: from [192.168.178.21] (brln-4d0c2b39.pool.mediaWays.net [77.12.43.57]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0M3wRS-1UzTZZ3Fhq-00rqVL; Wed, 20 Feb 2013 07:58:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130105 Thunderbird/17.0.2 In-Reply-To: X-Provags-ID: V02:K0:wk7r29rsmSF00FnEcU4wa3RqE6n4UzLXnb9pUaQSMYh 0UPbAxPpBOXXu5unrD9GXBUVm3IkBN/n6wnM6vfmV3Nju2IcZp QFWP7lBFGyim2xkEIC6CL7EVkRVTyaJoQBY3cAEzlBmCxPW5yX cvJ7Ou4B4z+bMfAyPkZTME4PF666HfRCCLmetxsZdLAKgskPSZ Oipb42At1WxcqB4eQppi6RAXvaNusKjB5CtONMUwNL3kyNl8/J 9AZtbV/6fYbyq3d2S6SvYwpF86MFCaVi6acg56YobfSHk49uoi 58NwmvheFKYOhauBvkc+nPDM9rVvXv2bLZ4SlZAhHk6HwmFAF3 PHQsXETbleh4uZnOqMqw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.126.171 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:157189 Archived-At: Am 20.02.2013 01:28, schrieb Brendan Miller: > Right now emacs has several modules that offer "go to definition" > functionality, all of which have different implementations, and > different behavior. > > 1. Etags uses M-. and M-* to push and pop from a pair of tag stacks > (find-tag-marker-ring, and tags-location-ring). > > 2. elisp uses C-h f TAB RETURN to jump to definition. It has no tag > stack, so there's no way to jump back. > > 3. CEDET uses C-c , J to jump to definition. It has no tag stack, > though it pushes to the global mark ring. > > 4. Jedi (jump to definition/autocompletion for python) uses C-. It has > no tag stack. > > 5. SLIME uses etags keybindings, but I don't think it uses etags stack. > > By far the etags interface (M-. to jump to definition and push the > location, M-* to pop back), is the easiest interface to use, though > the underlying tagging engine is less precise than the others. > > My suggestion is that the etags key bindings and tag stack be made > generic, and that M-. trigger some kind of callback through a buffer > local variable, so that jump to definition can be handled in a mode > specific way. > > Note that in addition to reusing the same keybindings, reusing the > same tag stack gives that added benefits that it's possible to > navigate through a high level language into a lower level language, > and then pop back out with M-*. I have this mocked up (in kind of a > hacky way) with elisp and C, where I can jump from elisp into the C > definition of a native function, navigate around C with etags or > CEDET, and then pop back out back into elisp again. > > I'd be interested in taking a look at the implementation work behind > this in the future, but initially I just wanted to put the idea out > there for feedback. > > Brendan Miller > > Are backsides of etags: need to run in advance, hard to follow when changing Emacs version My favourite is a solution based on find-function-noselect http://repo.or.cz/w/elbb.git/blob/HEAD:/code/Go-to-Emacs-Lisp-Definition.el Andreas