I run Emacs locally on my Windows machine, but edit everything remotely, via tramp & plink (PuTTY's implementation of ssh). This all works just fine, but, as I found out today, TAGS files for large projects do not work. It's not that these files are that large - 12 Mb, in my case, a few thousand .cpp files, but still.
If I load TAGS file with
visit-tags-table remotely, with
/plink:user@host:/home/user/project/TAGS path, my Emacs just hangs forever, eating 100% of one of the CPU cores. It does not happen for smaller files, these work just fine, but for larger ones in happened every time I tried.
If I load it remotely, but with pscp,
/pscp:user@host:/home/user/project/TAGS, it just does not load,
tags-apropos shows no tags loaded.
If I copy the TAGS file to my local machine,
visit-tags-table load tags just fine, but when I use them, Emacs expects the files mentioned there to be where the TAGS file is, i.e. on my local machine. If I generate TAGS with relative paths, it would try to open
c:/emacs/home/path/file.h, if I use
--tag-relative=no when generating TAGS to obtain absolute paths, the path changes to
Of these three fails the last one looks the most 'fixable' (for the first two I suspect some shady network configuration issues), but I have yet to find how to make a local TAGS file work for remote projects.
Dirty hacks like changing all paths in TAGS with sed from
/plink:user@host:/home/... don't work, I tried (Emacs just tries to open
c:/plink!user@host!/home/... file in this case).
In this question someone offered rewriting a
etags-file-of-tag function from etags.el - this looks promising, but that does not work for me either (either this is a wrong function, or I'm doing something very wrong: no matter how I change that one, it doesn't seem to affect anything). Unfortunately, I have a quite limited understanding of elisp and how Emacs works in general, so I am stuck at the moment.
I really want TAGS to work for this project, so any ideas or advice will be appreciated.