Subject: Re: [Ivan Shmakov] process-send-string apparently mangles \r into \n

From: Lars Magne Ingebrigtsen <[email-masked]>
Date: Sun, 11 Sep 2011 20:26:13 +0200

Sven Joachim <[email-masked]> writes:

> (let* ((coding-system-for-read  'binary)
>        (coding-system-for-write 'binary)
>        (p (start-process "foo" "*foo*" "od" "-td1")))
>     (process-send-string p "\r\n")
>     (process-send-eof p))
> ;; => #<process foo>
>
> 	the `*foo*' buffer contains:
>
> --cut: *foo*--
> 0000000   10   10
> 0000002
>
> Process foo finished

I can confirm this behaviour in Emacs 24.  And it's isn't just CRLF
conversion -- all "\r"s are translated into "\n":

(let* ((coding-system-for-read  'binary)
       (coding-system-for-write 'binary)
       (p (start-process "foo" "*foo*" "od" "-td1")))
    (process-send-string p "a\rb\n")
    (process-send-eof p))

Gives:    
    
Process foo<2> finished
0000000   97   10   98   10
0000004

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/