2

I have in my startup init file a setting:

(setq tags-table-list (list "~/linux/TAGS"))

After using emacs and TAGS tables, I now want to change that to:

(setq tags-table-list (list "~/trunk/TAGS"))

However, the old linux TAGS are still being used in addition to the new trunk.

How can I expunge the old TAGS table? I tried also deleting the buffer, but it just gets reloaded.

  • Checkout the etags-select and etags-table packages for fine control of TAGS files (yes, they work with ctags too). – Kaushal Modi Nov 7 '15 at 18:36
2

I encountered the similar problem weeks ago and found it was caused by desktop.el: once you enable desktop-save-mode in your init file, some global variables (specified by user option desktop-globals-to-save, which includes tags-table-list by default) will be recovered and also override you own setting in init file. So if you was in the same situation, simply evaluate (setq tags-table-list (list "~/trunk/TAGS")) with C-x C-e before closing Emacs.

  • You can modify desktop-globals-to-save variable to NOT save tags-file-name and tags-table-list. – Kaushal Modi Nov 6 '15 at 17:31
  • I'm facing this issue in a single invocation of Emacs, not due to restarting Emacs. – WilliamKF Nov 6 '15 at 20:13
  • @kaushalmodi You're right, I agree your solution is more correct. I will consider to update the answer accordingly. – xuchunyang Nov 7 '15 at 5:28
  • @WilliamKF I think I didn't misunderstand you on this, I was saying it might be due to desktop-save-mode. – xuchunyang Nov 7 '15 at 5:30
1

If you set tags-table-list, do not also set ‘tags-file-name’.

Moreover if your TAGS file name is "TAGS" you can only write the directory path:

(setq tags-table-list (list "~/trunk/"))

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.