Search code examples
emacstramp

Does tramp offer any API for interrogating information from the buffer-file-name


I'm currently doing a lot of work on remote machines with tramp. However the project logic gets confused when building make command lines as it will attempt to cd to some /ssh:blah.... path.

Does tramp provide any API functions to test if a buffer or a buffer filename is actually managed by tramp and therefor on a remote machine? Can it provide additional information about the type of connection (for example ssh user/host details)?


Solution

  • As to your first question about checking if a filename is managed by tramp, see the function tramp-tramp-file-p, which will return t if filename is a tramp file.