Note that there are some explanatory texts on larger screens.

plurals
  1. POwhy is etags generating a corrupted TAGS file?
    primarykey
    data
    text
    <p>I have the following minimal source file:</p> <pre><code>$ cat path/xx/yy/fooBar.c void this_is_a_test(void) { } </code></pre> <p>If I run etags like this it works ok:</p> <pre><code>$ etags path/xx/yy/fooBar.c $ cat TAGS path/xx/yy/fooBar.c,25 void this_is_a_test(1,0 </code></pre> <p>But if I run etags via find/xargs the TAGS file is corrupted:</p> <pre><code>$ find . -name fooBar.c ./path/xx/yy/fooBar.c $ find . -name fooBar.c | xargs etags $ cat TAGS path/xx/yy/fBoBar.c,25 void this_is_a_test(^?1,0 </code></pre> <p>Note the filename shows up above as fBoBar.c -- bogus!</p> <p>I like to be able to generate TAGS by doing something like <code>find . -name '*.[ch]' | xargs etags</code>. But it is corrupting most of the filenames when I do this.</p> <p>Any idea why it is failing like this, and/or what I can do to make it work?</p> <p>Ubuntu Lucid. Etags is from emacs23-bin-common 23.1+1-4ubuntu7.</p> <p><strong>Edit</strong>:</p> <p>In response to fschmitt's question:</p> <pre><code>$ etags $(find . -name fooBar.c) $ cat TAGS path/xx/yy/fBoBar.c,25 void this_is_a_test(1,0 </code></pre> <p><strong>New info</strong>:</p> <p>I just noticed that the difference between the two uses in my original question above is the leading <code>.</code> on the path. And if I call etags like <code>etags ./path/xx/yy/fooBar.c</code>, it corrupts the file. So a workaround is to make sure the args to etags don't have leading tags. (Perhaps this is a bug in etags, because the documentation describes my usage pattern almost exactly.)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload