4803 |
(pop-to-buffer (current-buffer)) |
(pop-to-buffer (current-buffer)) |
4804 |
(funcall 'signal signal (apply 'format fmt args)))) |
(funcall 'signal signal (apply 'format fmt args)))) |
4805 |
|
|
4806 |
|
;; Chunked sending kluge. |
4807 |
|
(defvar tramp-chunksize nil |
4808 |
|
"If non-nil, chunksize for sending things to remote host.") |
4809 |
|
|
4810 |
(defun tramp-send-region (multi-method method user host start end) |
(defun tramp-send-region (multi-method method user host start end) |
4811 |
"Send the region from START to END to remote command |
"Send the region from START to END to remote command |
4812 |
running as USER on HOST using METHOD." |
running as USER on HOST using METHOD." |
4814 |
(tramp-get-buffer multi-method method user host)))) |
(tramp-get-buffer multi-method method user host)))) |
4815 |
(unless proc |
(unless proc |
4816 |
(error "Can't send region to remote host -- not logged in")) |
(error "Can't send region to remote host -- not logged in")) |
4817 |
(process-send-region proc start end) |
(if tramp-chunksize |
4818 |
|
(let ((pos start)) |
4819 |
|
(while (< pos end) |
4820 |
|
(tramp-message-for-buffer |
4821 |
|
multi-method method user host 10 |
4822 |
|
"Sending chunk from %s to %s" pos end) |
4823 |
|
(process-send-region proc |
4824 |
|
pos |
4825 |
|
(min (+ pos tramp-chunksize) |
4826 |
|
end)) |
4827 |
|
(setq pos (+ pos tramp-chunksize)) |
4828 |
|
(sleep-for 0.1))) |
4829 |
|
(process-send-region proc start end)) |
4830 |
(when tramp-debug-buffer |
(when tramp-debug-buffer |
4831 |
(append-to-buffer |
(append-to-buffer |
4832 |
(tramp-get-debug-buffer multi-method method user host) |
(tramp-get-debug-buffer multi-method method user host) |