Search code examples
emacsline-endingstramp

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


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

  • (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.