0

generating python tags with

for file in $(find -type f -regex ".+\\.\(py\)"); do etags -a $file; done

doesn't load at emacs with error

path/TAGS is not a valid tags file

although other language i.e c works just fine, and syntax of generated TAGS doesn't look odd!

1

You can generate the TAG file like this:

find . -name "*.py" | xargs etags -a

Then in .emacs file:

(setq tags-table-list (list "/path/to/TAG/file/dir/"))

0

the problem was with emacs configuration, it worked after re-installation.

with general regex

cd $1
rm -rf TAGS
for file in $(find $1 -type f -regex ".+\\.c?h?S?\(cpp\)?\(cxx\)?\(cc\)?\(hpp\)?\(hxx\)?\(hh\)?\(rb\)?\(go\)?\(js\)?\(py\)?\(java\)?" ); do
    echo "adding $file"
    etags -a $file
done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.