emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tramp and conversion of \r\n into \n


From: Stefan Monnier
Subject: Re: Tramp and conversion of \r\n into \n
Date: Thu, 05 Aug 2021 10:10:40 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> (make-process :name "hexdump" :command '("hexdump" "-v" "-e" "/1 
>> \"%02X\n\"") :buffer "hexdump")
>> (process-send-string "hexdump" "abc\r\n")
>
> on my system (Linux, Emacs 27.1):
>
>> 61
>> 62
>> 63
>> 0A
>> 0A

What you're seeing here is the effect of the use of a tty (i.e. the
conversion or \r to \n is done by the tty rather than by Emacs).

Try to add `:connection-type 'pipe` to see the difference (you may also
have to add a call to `process-send-eof` to flush the send buffer, IIRC).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]