* Nifty C++ features
@ 2004-01-27 15:51 David Rasmussen
2004-01-27 16:08 ` Bruce Ingalls
2004-01-27 16:47 ` Klaus Berndl
0 siblings, 2 replies; 3+ messages in thread
From: David Rasmussen @ 2004-01-27 15:51 UTC (permalink / raw)
How do I get emacs to open the file that a variable, function or class
is defined in, given that it is in the current directory?
Example:
int main()
{
Position pos;
cout << pos << endl;
Moves mvs;
generateMoves(pos,mvs);
for (int i = 0; i < mvs.size(); ++i)
cout << mvs[i] << " ";
}
I want to be able to place the cursor anywhere in the "generateMoves"
string, and press some keys, and then emacs should open, in a new
buffer, the file where generateMoves is defined.
/David
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Nifty C++ features
2004-01-27 15:51 Nifty C++ features David Rasmussen
@ 2004-01-27 16:08 ` Bruce Ingalls
2004-01-27 16:47 ` Klaus Berndl
1 sibling, 0 replies; 3+ messages in thread
From: Bruce Ingalls @ 2004-01-27 16:08 UTC (permalink / raw)
David Rasmussen wrote:
> How do I get emacs to open the file that a variable, function or class
> is defined in, given that it is in the current directory?
Have you looked at ffap.el, Exhuberant Ctags <url: http://sf.net/ > and
perhaps speedbar.el? <url: http://cedet.sf.net/ >
Grep is also your friend.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Nifty C++ features
2004-01-27 15:51 Nifty C++ features David Rasmussen
2004-01-27 16:08 ` Bruce Ingalls
@ 2004-01-27 16:47 ` Klaus Berndl
1 sibling, 0 replies; 3+ messages in thread
From: Klaus Berndl @ 2004-01-27 16:47 UTC (permalink / raw)
On Tue, 27 Jan 2004, David Rasmussen wrote:
> How do I get emacs to open the file that a variable, function or class
> is defined in, given that it is in the current directory?
>
> Example:
>
> int main()
> {
> Position pos;
> cout << pos << endl;
>
> Moves mvs;
> generateMoves(pos,mvs);
> for (int i = 0; i < mvs.size(); ++i)
> cout << mvs[i] << " ";
> }
>
> I want to be able to place the cursor anywhere in the "generateMoves"
> string, and press some keys, and then emacs should open, in a new
> buffer, the file where generateMoves is defined.
For this you either need etags (ctags) - which is already shipped with Emacs
or the latest cedet-library (incl. semantic 2.0) which offers such
functionality too - current released beta is not perfect (AFAIK) but the
CVS-code of this library runs pretty well.
Klaus
>
> /David
--
Klaus Berndl mailto: klaus.berndl@sdm.de
sd&m AG http://www.sdm.de
software design & management
Carl-Wery-Str. 42, 81739 Muenchen, Germany
Tel +49 89 63812-392, Fax -220
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-27 16:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-27 15:51 Nifty C++ features David Rasmussen
2004-01-27 16:08 ` Bruce Ingalls
2004-01-27 16:47 ` Klaus Berndl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).