diff options
| author | Michael Albinus | 2008-11-26 06:09:17 +0000 |
|---|---|---|
| committer | Michael Albinus | 2008-11-26 06:09:17 +0000 |
| commit | 1d7e9a015e4dd3434ddbd37a3c24971e0afcc09f (patch) | |
| tree | 3f96477f9ffce2c29708af8ec38074ac6e479185 | |
| parent | f4bd91bede5fe23d203e6517506a230cdca0b281 (diff) | |
| download | emacs-1d7e9a015e4dd3434ddbd37a3c24971e0afcc09f.tar.gz emacs-1d7e9a015e4dd3434ddbd37a3c24971e0afcc09f.zip | |
* net/tramp.el (tramp-handle-write-region): Improve the check for
calling direct copy.
(tramp-find-inline-encoding): Don't raise an error but a warning,
when no inline encoding is found.
(tramp-get-remote-coding): Check for a symbol. The negative check
for a string fails, when there is an empty string.
| -rw-r--r-- | lisp/net/tramp.el | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 1bf29697aff..290fa2b8e89 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -40,10 +40,6 @@ | |||
| 40 | ;; and higher. For XEmacs 21, you need the package `fsf-compat' for | 40 | ;; and higher. For XEmacs 21, you need the package `fsf-compat' for |
| 41 | ;; the `with-timeout' macro.) | 41 | ;; the `with-timeout' macro.) |
| 42 | ;; | 42 | ;; |
| 43 | ;; This version might not work with pre-Emacs 21 VC unless VC is | ||
| 44 | ;; loaded before tramp.el. Could you please test this and tell me about | ||
| 45 | ;; the result? Thanks. | ||
| 46 | ;; | ||
| 47 | ;; Also see the todo list at the bottom of this file. | 43 | ;; Also see the todo list at the bottom of this file. |
| 48 | ;; | 44 | ;; |
| 49 | ;; The current version of Tramp can be retrieved from the following URL: | 45 | ;; The current version of Tramp can be retrieved from the following URL: |
| @@ -4297,13 +4293,13 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file." | |||
| 4297 | ;; `rename-file' handles direct copy and out-of-band methods. | 4293 | ;; `rename-file' handles direct copy and out-of-band methods. |
| 4298 | ((or (tramp-local-host-p v) | 4294 | ((or (tramp-local-host-p v) |
| 4299 | (and (tramp-method-out-of-band-p v) | 4295 | (and (tramp-method-out-of-band-p v) |
| 4300 | (integerp start) | 4296 | (> (- (or end (point-max)) (or start (point-min))) |
| 4301 | (> (- end start) tramp-copy-size-limit))) | 4297 | tramp-copy-size-limit))) |
| 4302 | (rename-file tmpfile filename t)) | 4298 | (rename-file tmpfile filename t)) |
| 4303 | 4299 | ||
| 4304 | ;; Use inline file transfer | 4300 | ;; Use inline file transfer. |
| 4305 | (rem-dec | 4301 | (rem-dec |
| 4306 | ;; Encode tmpfile | 4302 | ;; Encode tmpfile. |
| 4307 | (tramp-message v 5 "Encoding region...") | 4303 | (tramp-message v 5 "Encoding region...") |
| 4308 | (unwind-protect | 4304 | (unwind-protect |
| 4309 | (with-temp-buffer | 4305 | (with-temp-buffer |
| @@ -6108,11 +6104,9 @@ Goes through the list `tramp-local-coding-commands' and | |||
| 6108 | (setq rem-dec (nth 2 ritem)) | 6104 | (setq rem-dec (nth 2 ritem)) |
| 6109 | (setq found t))))))) | 6105 | (setq found t))))))) |
| 6110 | 6106 | ||
| 6111 | ;; Did we find something? If not, issue an error. | 6107 | ;; Did we find something? |
| 6112 | (unless found | 6108 | (unless found |
| 6113 | (kill-process (tramp-get-connection-process vec)) | 6109 | (tramp-message vec 2 "Couldn't find an inline transfer encoding")) |
| 6114 | (tramp-error | ||
| 6115 | vec 'file-error "Couldn't find an inline transfer encoding")) | ||
| 6116 | 6110 | ||
| 6117 | ;; Set connection properties. | 6111 | ;; Set connection properties. |
| 6118 | (tramp-message vec 5 "Using local encoding `%s'" loc-enc) | 6112 | (tramp-message vec 5 "Using local encoding `%s'" loc-enc) |
| @@ -7152,7 +7146,7 @@ necessary only. This function will be used in file name completion." | |||
| 7152 | (let ((ret (tramp-get-local-coding vec prop))) | 7146 | (let ((ret (tramp-get-local-coding vec prop))) |
| 7153 | ;; The connection property might have been cached. So we must send | 7147 | ;; The connection property might have been cached. So we must send |
| 7154 | ;; the script - maybe. | 7148 | ;; the script - maybe. |
| 7155 | (when (not (stringp ret)) | 7149 | (when (and ret (symbolp ret)) |
| 7156 | (let ((name (symbol-name ret))) | 7150 | (let ((name (symbol-name ret))) |
| 7157 | (while (string-match (regexp-quote "-") name) | 7151 | (while (string-match (regexp-quote "-") name) |
| 7158 | (setq name (replace-match "_" nil t name))) | 7152 | (setq name (replace-match "_" nil t name))) |
| @@ -7566,6 +7560,8 @@ Only works for Bourne-like shells." | |||
| 7566 | ;; SSH instance, would correctly be propagated to the remote process | 7560 | ;; SSH instance, would correctly be propagated to the remote process |
| 7567 | ;; automatically; possibly SSH would have to be started with | 7561 | ;; automatically; possibly SSH would have to be started with |
| 7568 | ;; "-t". (Markus Triska) | 7562 | ;; "-t". (Markus Triska) |
| 7563 | ;; * Support IPv6 hostnames. Use "/[some:ip:v6:address:for:tramp]:/", | ||
| 7564 | ;; which is the syntax used on web browsers. (Óscar Fuentes) | ||
| 7569 | 7565 | ||
| 7570 | ;; Functions for file-name-handler-alist: | 7566 | ;; Functions for file-name-handler-alist: |
| 7571 | ;; diff-latest-backup-file -- in diff.el | 7567 | ;; diff-latest-backup-file -- in diff.el |