unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Best way to get a cross-reference listing...
@ 2003-04-22 14:38 brian.auld
  2003-04-23  9:25 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: brian.auld @ 2003-04-22 14:38 UTC (permalink / raw)


Howdy,

I've made the push the past week, and feel that I've gotten over the initial emacs hump, and now feel comfortable sticking with it. I was coming from an intermediate vi and vslick background.

A couple questions on things I haven't figured out how to do well. 

(1) Cross-referencing
---------------------
I'm focussed on the linux kernel tree, mostly drivers. If I want to see all cross-references to a C symbol, so far I've found that M-x grep-find works the best. The problem is that I can't control what window the 'grep-find' results are displayed in. I usually have multiple windows open at one time, and want to display the result in a specific window. If I go to that window, and then enter the M-x grep-find command, the results are displayed in another window ... usually one that I don't want to be overwritten. I can always move buffer contents around later, but it's a pain.

Does anyone have any suggestions on (a) how to target a window with M-x grep-find, or an alternate way to cross-reference a code tree.

(2) etags
---------
I find if I try to etag the entire linux kernel tree using for example:

find . -name "*.[chCH]" | xargs etags -o kernel-tags

the tags never seem to be complete. What I end up doing is running something similar to the above for a bunch of sub-trees within the kernel that are of interest to me. Does anyone know why the above command doesn't seem to work for the entire kernel tree? Am I using the wrong command? Is there a different way to get a complete tags file?

Thanks,

-- Brian

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Best way to get a cross-reference listing...
       [not found] <mailman.5071.1051023013.21513.help-gnu-emacs@gnu.org>
@ 2003-04-23  6:20 ` Kai Großjohann
  0 siblings, 0 replies; 8+ messages in thread
From: Kai Großjohann @ 2003-04-23  6:20 UTC (permalink / raw)


brian.auld@adic.com writes:

> (2) etags
> ---------
> I find if I try to etag the entire linux kernel tree using for example:
>
> find . -name "*.[chCH]" | xargs etags -o kernel-tags
>
> the tags never seem to be complete.

Yeah.  xargs reads a number of filenames, then executes etags, then
reads another bunch of filenames, executes etags again.

The last bunch overwrites the previous TAGS files.

etags has an option to append to the previous TAGS file.  Maybe you
have to remove the old one before running the find command.
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Best way to get a cross-reference listing...
  2003-04-22 14:38 Best way to get a cross-reference listing brian.auld
@ 2003-04-23  9:25 ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2003-04-23  9:25 UTC (permalink / raw)


> From: brian.auld@adic.com
> Date: Tue, 22 Apr 2003 07:38:45 -0700
> 
> Does anyone have any suggestions on (a) how to target a window with
> M-x grep-find, or an alternate way to cross-reference a code tree.

Download and install the GNU Id-utils package, and then use the 
"M-x gid" command instead.  Not only is it _much_ faster than
grep-find, but it also knows about the syntax of C (and other
programming languages, so it will never show you false hits due
to a substring that matched.  It will also automatically search
for the symbol at point as the default, and keep the results of
each search in a separate buffer, so you could consult them again
later.

As for the problem of the window that pops up in seemingly random
places, this is actually a feature, and my advice is to get used to
it: Emacs was not designed for rigid position of its windows.
However, you could make that window pop in a different frame (see
the variables `special-display-regexps' and
`special-display-buffer-names', for more about this feature).

> I find if I try to etag the entire linux kernel tree using for example:
> 
> find . -name "*.[chCH]" | xargs etags -o kernel-tags
> 
> the tags never seem to be complete.

That's wrong usage: you don't need xargs.  Try this instead:

  find . -name "*.[chCH]" | etags -o kernel-tags -

(and I'd also include *.y files in the pattern, btw).

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: Best way to get a cross-reference listing...
@ 2003-04-23 13:35 brian.auld
  2003-04-23 19:53 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: brian.auld @ 2003-04-23 13:35 UTC (permalink / raw)


Thanks for your valuable feedback. I have another question below.

> -----Original Message-----
> From: Eli Zaretskii [mailto:eliz@elta.co.il]
> Sent: Wednesday, April 23, 2003 5:25 AM
> To: help-gnu-emacs@gnu.org
> Subject: Re: Best way to get a cross-reference listing...
> 
> <--- cut ---->
>
> Download and install the GNU Id-utils package, and then use the
> "M-x gid" command instead.  


I downloaded and installed gid on my linux box. However, an 'M-x gid' results in a [no-match] beeeeep. Is there a step I'm missing??

>
> <--- cut ---->

Thanks again,

Brian

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Best way to get a cross-reference listing...
  2003-04-23 13:35 brian.auld
@ 2003-04-23 19:53 ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2003-04-23 19:53 UTC (permalink / raw)


> From: brian.auld@adic.com
> Date: Wed, 23 Apr 2003 06:35:09 -0700
> 
> I downloaded and installed gid on my linux box. However, an 'M-x gid' results in a [no-match] beeeeep. Is there a step I'm missing??

You need to install id-utils.el somewhere where Emacs will find it
(along your load-path) and add this line to your ~/.emacs init file:

 (autoload 'gid "id-utils" "Interface to ID Utils" t)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Best way to get a cross-reference listing...
       [not found] <mailman.5112.1051105181.21513.help-gnu-emacs@gnu.org>
@ 2003-04-24 14:05 ` Zap Branigan
  2003-04-24 20:28   ` Eli Zaretskii
       [not found]   ` <mailman.5175.1051216377.21513.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Zap Branigan @ 2003-04-24 14:05 UTC (permalink / raw)


>>>>> "brian" == brian auld <brian.auld@adic.com> writes:

    brian> Thanks for your valuable feedback. I have another question
    brian> below.
    >> -----Original Message----- From: Eli Zaretskii
    >> [mailto:eliz@elta.co.il] Sent: Wednesday, April 23, 2003 5:25
    >> AM To: help-gnu-emacs@gnu.org Subject: Re: Best way to get a
    >> cross-reference listing...
    >> 
    >> <--- cut ---->
    >> 
    >> Download and install the GNU Id-utils package, and then use the
    >> "M-x gid" command instead.


    brian> I downloaded and installed gid on my linux box. However, an
    brian> 'M-x gid' results in a [no-match] beeeeep. Is there a step
    brian> I'm missing??

don't forget to build your (ID) index file.  man mkid.


-- 
Consider yon black dog, ranging thru stubble and shoot,
Meseems he coileth magic meshes 
To be a sometime fetter 'round out feet.
The circle narrows.  He draws near!                        _Faust_  

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Best way to get a cross-reference listing...
  2003-04-24 14:05 ` Zap Branigan
@ 2003-04-24 20:28   ` Eli Zaretskii
       [not found]   ` <mailman.5175.1051216377.21513.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2003-04-24 20:28 UTC (permalink / raw)


> Date: Thu, 24 Apr 2003 14:05:28 GMT
> Newsgroups: gnu.emacs.help
> From: Zap Branigan <zbranigan@volcanomail.com>
> 
> don't forget to build your (ID) index file.  man mkid.

You mean "info mkid", right?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Best way to get a cross-reference listing...
       [not found]   ` <mailman.5175.1051216377.21513.help-gnu-emacs@gnu.org>
@ 2003-04-25 17:04     ` Zap Branigan
  0 siblings, 0 replies; 8+ messages in thread
From: Zap Branigan @ 2003-04-25 17:04 UTC (permalink / raw)


>>>>> "Eli" == Eli Zaretskii <eliz@elta.co.il> writes:

    >> Date: Thu, 24 Apr 2003 14:05:28 GMT Newsgroups: gnu.emacs.help
    >> From: Zap Branigan <zbranigan@volcanomail.com>
    >> 
    >> don't forget to build your (ID) index file.  man mkid.

    Eli> You mean "info mkid", right?

Yeah.  my bad.



-- 
Consider yon black dog, ranging thru stubble and shoot,
Meseems he coileth magic meshes 
To be a sometime fetter 'round out feet.
The circle narrows.  He draws near!                        _Faust_  

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-04-25 17:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-22 14:38 Best way to get a cross-reference listing brian.auld
2003-04-23  9:25 ` Eli Zaretskii
     [not found] <mailman.5071.1051023013.21513.help-gnu-emacs@gnu.org>
2003-04-23  6:20 ` Kai Großjohann
  -- strict thread matches above, loose matches on Subject: below --
2003-04-23 13:35 brian.auld
2003-04-23 19:53 ` Eli Zaretskii
     [not found] <mailman.5112.1051105181.21513.help-gnu-emacs@gnu.org>
2003-04-24 14:05 ` Zap Branigan
2003-04-24 20:28   ` Eli Zaretskii
     [not found]   ` <mailman.5175.1051216377.21513.help-gnu-emacs@gnu.org>
2003-04-25 17:04     ` Zap Branigan

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).