tags 27772 + patch severity 27772 minor quit Daniel Lopez writes: > mkdir foo_files > cd foo_files > echo "const int foo_const = 1;" > foo.h > ctags -e foo.h Hmm... $ ctags -e foo.h ctags: invalid option -- 'e' Try 'ctags --help' for a complete list of options. $ ctags --version ctags (GNU Emacs 25.2.50) Copyright (C) 2017 Free Software Foundation, Inc. This program is distributed under the terms in ETAGS.README Using 'etags foo.h' I can reproduce your results. > I made some incomplete investigations into visit-tags-table-buffer > where this seems to be implemented - I saw that at one point it seems > to explicitly look up the local value of tags-file name: > > ;; First, try a local variable. > (cdr (assq 'tags-file-name (buffer-local-variables))) > > Inspired by that I tried changing the part below where it seems to get > the value of tags-table-list: > > ;; Fifth, use the user variable giving the table list. > ;; Find the first element of the list that actually exists. > (let ((list tags-table-list) > > to go explicitly via the (buffer-local-variables) alist as well: > > (let ((list (or (cdr (assq 'tags-table-list > (buffer-local-variables))) tags-table-list)) > > but it didn't seem to change the outcome of the above test case at > all. The problem is that the buffer gets changed by the time we reach there. The following patch seems to fix it (no need to explicitly use `buffer-local-variables' since normal variable access will check the buffer-local value first. I think the use of `buffer-local-variables' above is meant to ignore the global value of `tags-file-name').