From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: Sven Joachim <svenjoac@gmx.de>
Cc: Ivan Shmakov <oneingray@gmail.com>, 1523@debbugs.gnu.org
Subject: bug#1523: [Ivan Shmakov] process-send-string apparently mangles \r into \n
Date: Sun, 11 Sep 2011 20:26:13 +0200 [thread overview]
Message-ID: <m37h5faqbe.fsf@stories.gnus.org> (raw)
In-Reply-To: <873agxxd6q.fsf@turtle.gmx.de> (Sven Joachim's message of "Tue, 09 Dec 2008 22:15:41 +0100")
Sven Joachim <svenjoac@gmx.de> 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/
next prev parent reply other threads:[~2011-09-11 18:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 21:15 bug#1523: [Ivan Shmakov] process-send-string apparently mangles \r into \n Sven Joachim
2009-01-12 17:24 ` richardeng
2009-01-12 17:58 ` richardeng
2011-09-11 18:26 ` Lars Magne Ingebrigtsen [this message]
2011-09-11 19:24 ` Andreas Schwab
2011-09-11 19:27 ` Lars Magne Ingebrigtsen
2011-09-11 20:23 ` Andreas Schwab
2011-09-11 20:40 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m37h5faqbe.fsf@stories.gnus.org \
--to=larsi@gnus.org \
--cc=1523@debbugs.gnu.org \
--cc=oneingray@gmail.com \
--cc=svenjoac@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.