all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* etags not working properly
@ 2013-08-27  6:46 Luca Ferrari
  2013-08-27 15:14 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Ferrari @ 2013-08-27  6:46 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,
I'm trying to using etags against a quite larger project, the FreeBSD
source tree. What I've done is as follows:

cd /usr/src && find . -name '*.[ch]' -print0 | xargs -0 etags

After that, if I try to lookup (M-.) any tag, even the simpler and
common one, I got screwed: etags points me to another wrong location
or does not point me anywhere. For instance, "struct vmspace" is not
found, "struct vnode" points me to provnode, "struct rusage" points me
to a completely different #define, and so on.
Am I indexing the source tree in the wrong way?

I'm using emacs 24.3.1 with the associated etags.

Thanks,
Luca



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

* Re: etags not working properly
  2013-08-27  6:46 etags not working properly Luca Ferrari
@ 2013-08-27 15:14 ` Eli Zaretskii
  2013-08-28  6:44   ` Luca Ferrari
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2013-08-27 15:14 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 27 Aug 2013 08:46:42 +0200
> From: Luca Ferrari <fluca1978@infinito.it>
> 
> Hi all,
> I'm trying to using etags against a quite larger project, the FreeBSD
> source tree. What I've done is as follows:
> 
> cd /usr/src && find . -name '*.[ch]' -print0 | xargs -0 etags

Try

 cd /usr/src && find . -name '*.[ch]' | etags -



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

* Re: etags not working properly
  2013-08-27 15:14 ` Eli Zaretskii
@ 2013-08-28  6:44   ` Luca Ferrari
  2013-08-28 14:48     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Ferrari @ 2013-08-28  6:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Tue, Aug 27, 2013 at 5:14 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>  cd /usr/src && find . -name '*.[ch]' | etags -


Seems to work, at least against the faulty examples I found before.
What is the difference of using the stdin instead of piping via xargs?

Thanks,
Luca



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

* Re: etags not working properly
  2013-08-28  6:44   ` Luca Ferrari
@ 2013-08-28 14:48     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2013-08-28 14:48 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 28 Aug 2013 08:44:07 +0200
> From: Luca Ferrari <fluca1978@infinito.it>
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> On Tue, Aug 27, 2013 at 5:14 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> >  cd /usr/src && find . -name '*.[ch]' | etags -
> 
> 
> Seems to work, at least against the faulty examples I found before.
> What is the difference of using the stdin instead of piping via xargs?

The main difference is that when you do this via xargs, etags might be
invoked more than once (if the list of the files is long enough),
which will cause the 2nd, 3rd, etc. invocations to overwrite the
output file of the previous one.  So with xargs you need to use the -a
switch to etags, which you didn't.  As result, you probably got a
partial TAGS file: the one from the last invocation of etags by xargs.

However, since etags accepts the - argument, and then reads the file
names from its stdin, there's no reason to use xargs at all, so
getting rid of that kills two birds: no need for the -a complication,
and getting rid of xargs makes the command slightly faster -- a nice
bonus.



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

end of thread, other threads:[~2013-08-28 14:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27  6:46 etags not working properly Luca Ferrari
2013-08-27 15:14 ` Eli Zaretskii
2013-08-28  6:44   ` Luca Ferrari
2013-08-28 14:48     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.