help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: etags not working properly


From: Eli Zaretskii
Subject: Re: etags not working properly
Date: Wed, 28 Aug 2013 17:48:10 +0300

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]