Custom Tramp Methods

Ankit has an interesting post about setting up a custom Tramp method. His use case is a little complicated but the TL;DR is that his work involves writing software to control robots. For testing and development, they have an internal service that allows the instantiation of virtual robots that they can test their software on.

Once a virtual robot is created, they sometimes need to adjust the configuration or examine logs. This requires logging onto the server for the particular virtual robot in question—a complicated process. Ankit discovered that Tramp is actually quite flexible and allows the definition of different access methods. We’re mostly familiar with the SSH method that is the usual way of using Tramp but the SSH method is just one service in the list that Tramp uses to define its services.

Ankit’s idea was to define a new method that allowed him to “sign in” to any of the virtual robots and perform whatever actions were needed. That turned out to be reasonably simple. He also implemented a Tramp completion method to complete the name of the robot that he wanted to sign into. The whole thing took a surprisingly small amount of code.

This is another wonderful example of how Emacs can be persuaded to do whatever tasks your workflow requires. None of you are apt to need to replicate his workflow but his post is a great go-by for rolling your own Tramp service.

This entry was posted in General and tagged . Bookmark the permalink.