Tutorial :^M characters when using Tramp (on Windows) to connect to Ubuntu Server



Question:

I've set up Tramp on Emacs on my Windows 7 box (64 bit). For this test, this is the only thing in my emacs-config:

(setq tramp-default-method "plink")

Then I connect to my Ubuntu Server 9.10 running in a VM on my local network.

Connection goes fine, i can use dired to browse folders and open files. Yay!

However, git status shows up as:

Git:master^M

An when i open speedbar all folders and files ends with ^M, ie:

<+> conf/^M

Does anyone know how to prevent this line-ending collision from occurring?


Solution:1

don't know if this is it but I had a similar issue that I fixed with this.

(setq default-buffer-file-coding-system 'utf-8-unix)  

there's a few people who have asked how to get tramp working on windows(I actually gave up) so if you felt like documenting how you did it, there would likely be legions of thankful windows users out there.


Solution:2

(prefer-coding-system 'utf-8) did the trick!

Thanks Tom for the clue... Getting Tramp to work on my windows machine was no trouble at all. I'm using this version of Emacs:

GNU Emacs 23.1.50.1 (i386-mingw-nt6.1.7600)  of 2009-10-15 on LENNART-69DE564  

With this in my init.el:

(setq tramp-default-method "plink")  (prefer-coding-system 'utf-8)  

Putty directory with plink-app is in my system path.

Then: C-X C-F /username@192.168.0.2: and Tab brings up password prompt then autocompletion on servers-files.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »