My problem is that every line executing on the remote Linux machine seems to be including a trailing ^M (as is shown as ? in the file name
Content of my .org document:
* Test #+BEGIN_SRC sh :dir /plink:pi@raspberry:/home/pi/test touch apa touch bepa && echo ls -al #+END_SRC #+RESULTS: : total 8 : drwxr-xr-x 2 pi pi 4096 Nov 23 21:35 . : drwxr-xr-x 10 pi pi 4096 Nov 23 20:07 .. : -rw-r--r-- 1 pi pi 0 Nov 23 21:35 apa? : -rw-r--r-- 1 pi pi 0 Nov 23 21:35 bepa
If I ssh to my Linux machine and type the file name using tab completion I see
pi@raspberry:~/test $ ls apa^M
Running plink directly from a cmd.exe does not add ^M to the filename:
c:\>plink.exe -l pi raspberry "cd test && touch cepa"
I have saved the org document with Unix line endings, but I get the same result.
My current workaround is to add the
&& echo to eat the ^M, but I'd really like to find a better one...
I'm running Emacs 25.1 and org-mode v8.3.6 on Windows 10. My Linux machine is a raspberryPi running raspian jessie.