emacs Tramp on Windows
Posted by Alec The Geek on 15 May 2008
Updated Oct/08
I am using emacs with the tramp extension to edit files on a remote server using ssh. I had to pull in various hacks to get it to work so I hope these notes might help others.
- Install Emacs for Windows and Cygwin with OpenSSH
- Upgrade emacs Tramp to the latest version. This is best done using Cygwin bash and Cygwin make (in particular ensure that –with-lispdir and –infodir options are set correctly when running configure).
- Handy tip — leave the tramp build directory hanging around. When you next upgrade Emacs it’s just
make install(providing you use same directory names)
- Handy tip — leave the tramp build directory hanging around. When you next upgrade Emacs it’s just
- Ensure that the Cygwin bin directory is on the Windows system path
- At the Cygwin bash prompt test ssh connection to your host
- Generate public/private keys and upload to the host
- Test ssh again to see if public authentication works (it did not for me because it had been disabled by the UNIX admin)
- Configure emacs to use tramp
(require 'tramp)
;;(setq tramp-debug-buffer t)
;;(setq tramp-verbose 10)
(setq tramp-auto-save-directory "c:\\tmp")
(setq tramp-default-method "plink") - Start emacs and test connection (C-x C-f) using cygwin ssh/scp/sftp. If it works skip to step 14. I had issues so I continued with step 9
- Install the Putty program suite
- Test the connection using putty
- Ensure the Putty install directory is on the system PATH
- In emacs visit the host (C-x C-f) using the method ‘plink’. If that does not work you are on your own (but see troubleshooting below)
- If the public keys worked in ssh then import your OpenSSH keys into Putty
- Use emacs bookmarks to save your common host locations
Troubleshooting:
- Getting rid of the “Couldn’t find exit status of `test -e …” error message by deleting ~/emacs.d/tramp file. This clears cached settings as documented at http://www.nabble.com/Emacs-tramp-troubles-with-old-Sun-tt13607411.html.
- If Tramp and Emacs does not work for you try these alternatives:
YMMV
With many thanks to all the folks on the web who documented their experiences and Michael Albinus on the tramp-devl mailing list.
One Response to “emacs Tramp on Windows”
Sorry, the comment form is closed at this time.

![[FSF Associate Member]](http://static.fsf.org/nosvn/associate/fsf-10505.png)
emacs Tramp on Windows | My Geek Solutions said
[...] Andrew G.R. wrote an interesting post today onHere’s a quick excerptI am using emacs with the tramp extension to edit files on a remote server using ssh. I had to pull in various hacks to get it to work so I hope these notes might help others. There are also other free of cost options you may care to … [...]