GNU bug report logs - #1523
[Ivan Shmakov] process-send-string apparently mangles \r into \n

Previous Next

Package: emacs;

Reported by: Sven Joachim <svenjoac <at> gmx.de>

Date: Tue, 9 Dec 2008 21:20:03 UTC

Severity: normal

Tags: confirmed, notabug, patch

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Sven Joachim <svenjoac <at> gmx.de>
To: bug-gnu-emacs <at> gnu.org
Subject: bug#1523: [Ivan Shmakov] process-send-string apparently mangles \r into \n
Date: Tue, 09 Dec 2008 22:15:41 +0100
[Message part 1 (text/plain, inline)]
I received the following report via the Debian bug tracking system.
It is reproducible in the trunk.

[Message part 2 (message/rfc822, inline)]
From: Ivan Shmakov <oneingray <at> gmail.com>
To: submit <at> bugs.debian.org
Cc: Ivan Shmakov <oneingray <at> gmail.com>
Subject: Bug#508300: process-send-string apparently mangles \r into \n
Date: Wed, 10 Dec 2008 01:14:09 +0600
Package: emacs22
Version: 22.2+2-5

	After running the following program:

(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
--cut: *foo*--

	While I'd expect the following instead:

--cut: *foo*--
0000000   13   10
0000002

Process foo finished
--cut: *foo*--

	Compare:

(let ((coding-system-for-read  'binary)
      (coding-system-for-write 'binary))
  (save-excursion
    (set-buffer "*foo*")
    (let* ((start (point))
	   (end   (progn (insert "\r\n") (point))))
      (call-process-region start end "od" t t t "-td1"))))

--cut: *foo*--
0000000   13   10
0000002
--cut: *foo*--



This bug report was last modified 13 years and 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.