Getting Tramp to work on Xemacs

What is Tramp?

Tramp is an ange-ftp like utility for Emacs/Xemacs that allows remote file viewing.
More modern than ange-ftp, it's normally used to invoke secure protocols like scp, ssh etc., whereas ange-ftp was ftp based as its name implies. Tramp is actually an acronym for 'Transparent Remote (file) Access, Multiple Protocol'.

The Xemacs documentation for Tramp may be found here.

What goes in Xemacs config file?

     (require 'tramp)
     (setq tramp-default-method "scp")
     (setq tramp-default-user "yourusername") 



What syntax do you use to open a file on a remote machine?


The online manuals specify this pretty clearly but I somehow didn't take what they said to heart. To avoid invoking "efs" (Which Xemacs needs for package downloading, so it can't be turned off, but is FTP based which we don't want) we need to use Tramp-like syntax which means use square brackets around the machine name. 

A major point of confusion is that the Tramp syntax on Xemacs is not the same as the Tramp syntax on Emacs. Emacs uses the more conventional "EFS syntax" described below. Xemacs is obligated to disambiguate the two methods so Xemacs uses the less conventional "Tramp Syntax"as show below.


EFS syntax is
     /somehost.foobar.com:/path/to/file

Tramp syntax is
    /[somehost.foobar.com]/path/to/file
               or
    /[ssh/somehost.foobar.com]/path/to/file


Use the Tramp syntax - I wasn't doing this at first. I think I read the brackets but assumed they weren't meant to be taken literally. Ouch! If you use the EFS syntax, Xemacs will invoke EFS (duh!) which is not what I wanted and probably not what you want either! 

Notice the hostname is prefixed with "/[" and terminated with "]". This is the key point.

Comments

Ed Soniat said…
The hostname is prefixed with "/[" not "\[" as stated in your last line "key point".

Also my experience is that the "/path/to/file" can not include the "~" home directory reference.
For example if my home is /home/myhome
I can use /[ssh/me@my.other.computer.com]/home/myhome but not
/[ssh/me@my.other.computer.com]~/.
John Glotzer said…
1. Fixed the summary line at bottom - thanks.
2. Haven't tried that but it never hurts to spell out the full path for robustness.

Popular posts from this blog

Hit failing alternator with a hammer to confirm diagnosis of failing alternator due to bad brushes

alternatives --install gets stuck: failed to read link: No such file or directory

Using SSH, SOCKS, tsocks, and proxy settings to create a simultaneous "dual use" work/home computer