From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: etags not working properly Date: Wed, 28 Aug 2013 17:48:10 +0300 Message-ID: <8361upg9cl.fsf@gnu.org> References: <83ppszf9of.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1377701301 25399 80.91.229.3 (28 Aug 2013 14:48:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Aug 2013 14:48:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 28 16:48:24 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VEh2m-0001wo-7t for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Aug 2013 16:48:24 +0200 Original-Received: from localhost ([::1]:35233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEh2l-0004JZ-Ri for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Aug 2013 10:48:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEh2P-0004Ag-5I for help-gnu-emacs@gnu.org; Wed, 28 Aug 2013 10:48:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEh2J-0001IQ-Rh for help-gnu-emacs@gnu.org; Wed, 28 Aug 2013 10:48:01 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:34084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEh2J-0001HH-JO for help-gnu-emacs@gnu.org; Wed, 28 Aug 2013 10:47:55 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MS800G00X3I5L00@a-mtaout23.012.net.il> for help-gnu-emacs@gnu.org; Wed, 28 Aug 2013 17:47:54 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MS800GL3X3T5D00@a-mtaout23.012.net.il> for help-gnu-emacs@gnu.org; Wed, 28 Aug 2013 17:47:53 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93139 Archived-At: > Date: Wed, 28 Aug 2013 08:44:07 +0200 > From: Luca Ferrari > Cc: help-gnu-emacs > > On Tue, Aug 27, 2013 at 5:14 PM, Eli Zaretskii 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.