From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: elisp programming - navigate through code? Date: Sat, 29 Mar 2014 18:17:38 +0100 Message-ID: <87ob0oncul.fsf@gmail.com> References: <878urt0x1v.fsf@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1396113421 1360 80.91.229.3 (29 Mar 2014 17:17:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2014 17:17:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 29 18:16:53 2014 Return-path: Envelope-to: geh-help-gnu-emacs@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 1WTwsG-0006AN-TV for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Mar 2014 18:16:53 +0100 Original-Received: from localhost ([::1]:40240 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTwsG-0006gO-Ew for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Mar 2014 13:16:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTws1-0006g3-4Q for help-gnu-emacs@gnu.org; Sat, 29 Mar 2014 13:16:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTwru-0002Ih-JK for help-gnu-emacs@gnu.org; Sat, 29 Mar 2014 13:16:37 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:39190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTwru-0002IK-Db for help-gnu-emacs@gnu.org; Sat, 29 Mar 2014 13:16:30 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WTwrs-0005w1-8I for help-gnu-emacs@gnu.org; Sat, 29 Mar 2014 18:16:28 +0100 Original-Received: from e178058099.adsl.alicedsl.de ([85.178.58.99]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2014 18:16:28 +0100 Original-Received: from tjolitz by e178058099.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2014 18:16:28 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178058099.adsl.alicedsl.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:gi8VPpT5NT7Ipn3bG91JWBCkhak= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96836 Archived-At: Martin writes: > Hi there, > > This is now specially for elisp, but maybe its possible for other things to > (ruby on rails - ruby, javascript, coffeescript, ...) > > Is there a way to navigate better through my code. > > like having a function (foo arg1 arg2) putting the cursor to foo will > C-h f suggest I want to read the docstring for that. Thats good. > > But now I'd like to navigate to the definition (which can be in the same > buffer or somewhere else). Is that possbile? you can use tags ,-------------------------------------------------------------------- | http://www.gnu.org/software/emacs/manual/html_node/eintr/etags.html `-------------------------------------------------------------------- or a function like this: ,--------------------------------------------------- | ;; jumps to the source of the symbol at point | (defun tj/goto-symbol-definition () | "jump to the source of the symbol at point." | (interactive) | (require 'finder) | (let ((thing (intern (thing-at-point 'symbol)))) | (if (functionp thing) | (find-function thing) | (find-variable thing)))) `--------------------------------------------------- -- cheers, Thorsten