From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: unifying emacs "go to definition" functionality Date: Wed, 20 Feb 2013 09:52:06 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1361350349 20354 80.91.229.3 (20 Feb 2013 08:52:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2013 08:52:29 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 20 09:52:51 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 1U85Q3-0004No-Np for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2013 09:52:51 +0100 Original-Received: from localhost ([::1]:49637 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U85Pj-0004BH-FJ for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2013 03:52:31 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U85Pg-0004Ap-6w for emacs-devel@gnu.org; Wed, 20 Feb 2013 03:52:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U85Pa-0005GY-Qa for emacs-devel@gnu.org; Wed, 20 Feb 2013 03:52:28 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:39071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U85Pa-0005G7-Kf for emacs-devel@gnu.org; Wed, 20 Feb 2013 03:52:22 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U85Pr-0004GU-6Y for emacs-devel@gnu.org; Wed, 20 Feb 2013 09:52:39 +0100 Original-Received: from 212.46.170.189 ([212.46.170.189]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Feb 2013 09:52:39 +0100 Original-Received: from eller.helmut by 212.46.170.189 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Feb 2013 09:52:39 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 212.46.170.189 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:f7KTXB25TcYWCmtBvbD9W2cj89s= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:157192 Archived-At: On Wed, Feb 20 2013, Brendan Miller wrote: > 5. SLIME uses etags keybindings, but I don't think it uses etags stack. SLIME does use the etags stack but with different keybindings. We use M-. to push and M-, to pop. M-* is bound to the same command as M-, for compatibility but most people prefer M-, because , and . are adjacent on their keyboards and M-* is usually quite hard to type. I think M-, is the better choice and it should be the standard. [...] > 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. Using the etags stack is pretty easy. A more difficult problem is how to deal with names that have multiple definitions or definitions that have multiple source locations. E.g. in Emacs Lisp a variable and a function can have the same name or in C a function can have a prototype definition in a .h file and the actual definition is a .c file. This problem is especially important with languages that have multiple methods with the same name. In SLIME, when a name has multiple definitions we display all definitions (one per line with some context) in a special buffer and the user must then choose which one he wants (the next/previous-line commands in that buffer automatically displays the source of the current definition in the other buffer). The autocomplete package uses something like a menu for this problem. etags jumps to the first candidate and provides something like next/previous-definition commands, but I think that solution is very hard to use. At least it drives me nuts, because I never know how many more definitions there are and I can't remember the key bindings. Helmut