From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: navigate in C Date: Thu, 26 Oct 2006 09:51:38 -0600 Organization: IHS Message-ID: References: <4540BE07.5080201@mail.telepac.pt> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1161878032 17654 80.91.229.2 (26 Oct 2006 15:53:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Oct 2006 15:53:52 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 26 17:53:51 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gd7Y6-00033X-Ex for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Oct 2006 17:53:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gd7Y5-000224-U6 for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Oct 2006 11:53:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gd7Xg-0001qe-5P for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 11:53:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gd7Xb-0001jO-Cl for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 11:53:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gd7Xa-0001jC-WD for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 11:53:11 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Gd7Xa-0001ZO-Vk for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 11:53:11 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Gd7XF-0002sj-VM for help-gnu-emacs@gnu.org; Thu, 26 Oct 2006 17:52:49 +0200 Original-Received: from 207.167.42.206 ([207.167.42.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Oct 2006 17:52:49 +0200 Original-Received: from ihs_4664 by 207.167.42.206 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Oct 2006 17:52:49 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 88 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.206 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) In-Reply-To: <4540BE07.5080201@mail.telepac.pt> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38303 Archived-At: Pedro Sa da Costa wrote: > 1 - Is there a way in C mode to, by selecting the .h file or a method > and press a shortcut key, go that file or function? > > For example: > > #include "header.h" > > by pressing F3 in the selected "header.h", or simply have the cursor of > the header file, open the file. ,----[ C-h f ff-find-related-file RET ] | ff-find-related-file is an alias for `ff-find-other-file' in `find-file.el'. | (ff-find-related-file &optional in-other-window ignore-include) | | Find the header or source file corresponding to this file. | Being on a `#include' line pulls in that file. | | If optional in-other-window is non-nil, find the file in the other window. | If optional ignore-include is non-nil, ignore being on `#include' lines. | | Variables of interest include: | | - `ff-case-fold-search' | Non-nil means ignore cases in matches (see `case-fold-search'). | If you have extensions in different cases, you will want this to be nil. | | - `ff-always-in-other-window' | If non-nil, always open the other file in another window, unless an | argument is given to `ff-find-other-file'. | | - `ff-ignore-include' | If non-nil, ignores #include lines. | | - `ff-always-try-to-create' | If non-nil, always attempt to create the other file if it was not found. | | - `ff-quiet-mode' | If non-nil, traces which directories are being searched. | | - `ff-special-constructs' | A list of regular expressions specifying how to recognize special | constructs such as include files etc, and an associated method for | extracting the filename from that construct. | | - `ff-other-file-alist' | Alist of extensions to find given the current file's extension. | | - `ff-search-directories' | List of directories searched through with each extension specified in | `ff-other-file-alist' that matches this file's extension. | | - `ff-pre-find-hook' | List of functions to be called before the search for the file starts. | | - `ff-pre-load-hook' | List of functions to be called before the other file is loaded. | | - `ff-post-load-hook' | List of functions to be called after the other file is loaded. | | - `ff-not-found-hook' | List of functions to be called if the other file could not be found. | | - `ff-file-created-hook' | List of functions to be called if the other file has been created. | | [back] `---- > and > > int test(){ > call_test(); > > } > > have the cursor above "call_test()" call and pressing F3, goes to the > function. I think you need to create a tags table file, select it, then find the call_test tag. See the "Tags Tables" section of the Emacs manual. -- Kevin