[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[21.5] call-process-region problem
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Fri, 21 Nov 2003 15:32:08 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 06088
Although it may be a known problem, I think it is evil that the
call-process-region function requires the point to have to be in
the beginning or the end position when the 4th arg DELETEP is t.
It simply erases the buffer's contents when that requirement is
not satisfied. For instance:
(insert "Hello World")
(call-process-region (point-min) (point-max) "cat" t t)
Such an accident does not happen in Emacs or XEmacs 21.4. For
this reason, emacs-w3m has not run on XEmacs 21.5 since
2002-05-28 (but it will run by the end of today). I attach a
patch, although it may be too late.
2003-11-21 Katsumi Yamaoka <email@example.com>
* code-process.el (call-process-region): Move point to end of
region when DELETEP is non-nil.
--- code-process.el~ 2002-11-10 22:07:29 +0000
+++ code-process.el 2003-11-21 06:30:19 +0000
@@ -173,6 +173,8 @@
;; of the region.
(let ((s (and deletep (copy-marker start t)))
(e (and deletep (copy-marker end))))
+ (if deletep
+ (goto-char end))
(apply #'call-process program (list (current-buffer) start end)
buffer displayp args)))