Hello!
I checked out ben-mule-21-5 and found that my patch for
lisp/process.el (Mon, 23 Jul 2001) has not been applied. Has this bug
(see below) been fixed in another way?
The bug was this: When XEmacs calls a process and feeds a buffer to it
it does the following:
1. write the buffer to a file using coding-system-for-write (ok)
2. read this file into another buffer (inbuf) using 'binary (ok)
3. pipe inbuf to the process using coding-system-for-write (BUG!)
So the data gets transformed twice by coding-system-for-write.
I guess this writing the file and reading it back in will go away in
the future, right? Until then, call-process-internal is broken without
the patch.
-Edwin
Here's the patch if you should need it:
2001-07-23 Edwin Steiner <esteiner(a)net4you.at>
* process.el (call-process-internal): bind
coding-system-for-write to 'binary when calling
start-process-internal, so the process receives
the literal contents of INFILE.
Index: xemacs/lisp/process.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/lisp/process.el,v
retrieving revision 1.9
diff -u -r1.9 process.el
--- xemacs/lisp/process.el 2001/06/08 12:21:10 1.9
+++ xemacs/lisp/process.el 2001/07/23 19:13:46
@@ -122,13 +122,17 @@
(when (and stderr (not (eq t stderr)))
(setq stderr (expand-file-name stderr))
(setq errbuf (generate-new-buffer "*call-process*")))
- (setq proc
- (apply 'start-process-internal "*call-process*"
- buffer
- ;#### not implemented until my new process
- ;changes go in.
- ;(if (eq t stderr) buffer (list buffer errbuf))
- program args))
+ ;; We read INFILE using the binary coding-system.
+ ;; We must feed the process using the same coding-system, so
+ ;; that it really receives the contents of INFILE.
+ (let ((coding-system-for-write 'binary))
+ (setq proc
+ (apply 'start-process-internal "*call-process*"
+ buffer
+ ;#### not implemented until my new process
+ ;changes go in.
+ ;(if (eq t stderr) buffer (list buffer errbuf))
+ program args)))
(if buffer
(set-marker (process-mark proc) (point buffer) buffer))
(unwind-protect