Hello, I have put an improved version of gtags.el to the repository. [http://cvs.savannah.gnu.org/viewvc/*checkout*/global/global/gtags.el]
Changed: Now gtags-visit-rootdir works in TRAMP mode. Required: GNU Emacs version 25.1 or later (Tested on version 26). However, if you don't use 'gtags-visit-rootdir' then version 22 is good enough. Limitations: gtags-path-style: 'root is automatically converted to 'relative. The reason for supporting version 25.1 or later is because "individual remote process calls by let-binding process-environment" was first documented in this version. Regards, Shigio 2021年2月27日(土) 21:45 Shigio YAMAGUCHI <[email protected]>: > > Hello Michael, > It worked as expected! > > I've tried let-binding before, but it seems that > environment variables are not sent when the value > of process-environment is not changed. > > Anyway, it looks like I can realize 'gtags-visit-rootdir'. > I will register the new version in the repository > in a couple of days. > > Thank you very much for your polite explanation. > > Regards, > Shigio > > 2021年2月27日(土) 19:43 Michael Albinus <[email protected]>: > > > > Shigio YAMAGUCHI <[email protected]> writes: > > > > > Hello everybody, > > > > Hi Shigio, > > > > > I have put new gtags.el to the repository, which natively supports TRAMP. > > > [http://cvs.savannah.gnu.org/viewvc/*checkout*/global/global/gtags.el] > > > It's working somehow, can you give it a try? > > > > > > Required: > > > GNU Emacs version 22 or later (Tested on version 26). > > > Limitations: > > > gtags-visit-rootdir: Does not work. > > > gtags-path-style: 'root is automatically converted to 'relative. > > > > Well, I don't use GNU Global myself, so I cannot test. But I have > > compared your new version with an older one, lying around here. From dry > > code reading, it seems to be OK. Some Tramp functionality could be > > applied more simple if the backward compatibility wouldn't be up to > > Emacs 22, but that's just a side remark. > > > > > By the way, I still cannot pass environment variables to the remote site > > > using tramp mode. Can anyone please tell me how to do it? > > > > `tramp-remote-process-environment' is the place to use, However, it sets > > the environment when the connection is established. When you use an > > already running connection via `process-file', it won't help. > > > > Since Tramp 2.2.11 (Emacs 24.5), you can let-bind additional environment > > variables to `process-environment', which will be used for the remote > > process. The Tramp manual says: > > > > --8<---------------cut here---------------start------------->8--- > > In addition to ‘tramp-remote-process-environment’, you can set > > environment variables for individual remote process calls by let-binding > > ‘process-environment’. TRAMP applies any entries not present in the > > global default value of ‘process-environment’ (overriding > > ‘tramp-remote-process-environment’ settings, if they conflict). For > > example: > > > > (let ((process-environment (cons "HGPLAIN=1" process-environment))) > > (process-file ...)) > > > > Let-binding in this way works regardless of whether the process to be > > called is local or remote, since TRAMP would add just the ‘HGPLAIN’ > > setting and local processes would take whole value of > > ‘process-environment’ along with the new value of ‘HGPLAIN’. > > --8<---------------cut here---------------end--------------->8--- > > > > > Regards, > > > Shigio > > > > Best regards, Michael. > > > > -- > Shigio YAMAGUCHI <[email protected]> > PGP fingerprint: > 26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB -- Shigio YAMAGUCHI <[email protected]> PGP fingerprint: 26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB
