Why am I getting that my emacs tags is not a valid tags table?
Asked Answered
I

2

8

I just tried generating some tags for emacs by running something like:

ctags -e --extra=+q --sort=yes -R /codebase/one /codebase/two /usr/include /usr/include/c++

I drop this in some subdirectory of my home directory. And then I navigate to, say, codebase/one and do M-x visit tags-table and load that one and it complains with:

File /home/palchan/.tags/tags is not a valid tags table

why is this not a valid tags table?

Infeudation answered 6/2, 2013 at 0:27 Comment(0)
C
5

Try removing the --sort=yes option.

This solved the problem for me with both ctags versions 5.8 (latest) and 5.5.4 (distributed with my version of Linux).

You can also try the ctags binary that is shipped with Emacs, which is likely in the same directory as the Emacs binary. Note: the command line options are a little different.

Campanulate answered 6/2, 2013 at 3:14 Comment(2)
This worked! Thank you..btw do you know how to set the default TAGS file directory so I don't have to M-x visit-tags-table /home/palchan/.tags/tags every time?Infeudation
@PalaceChan (setq tags-file-name "/home/palchan/.tags/tags")Campanulate
M
3

Try the -e option -e Output tag file for use with Emacs.

Mordent answered 15/5, 2020 at 7:38 Comment(1)
Yes in general, but obviously not relevant to this particular question.Crispin

© 2022 - 2024 — McMap. All rights reserved.