aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2007-08-07 20:30:20 +0000
committerMichael Albinus2007-08-07 20:30:20 +0000
commit27e813fe4b976963ebc8851febc7902bbc869a51 (patch)
treeaa4bb68a123680fc31566ac50f20ad5926447062
parentc94d5f81aaef23672bf1be040c9388f8fe9f88e5 (diff)
downloademacs-27e813fe4b976963ebc8851febc7902bbc869a51.tar.gz
emacs-27e813fe4b976963ebc8851febc7902bbc869a51.zip
* net/tramp.el (tramp-wrong-passwd-regexp): Make the regexp more
global matching. (tramp-handle-process-file): Fix bug inserting resulting output. (tramp-handle-shell-command): Handle OUTPUT-BUFFER and ERROR-BUFFER more robust. Display output. (tramp-file-name-handler): Add a connection property when we found a foreign file name handler. This allows backends like ftp to profit also from usr/host name completion based on connection cache. (tramp-send-command-and-read): Search for trash after the regexp until eol only. In XEmacs, there is a problem with \n. * net/tramp-cache.el (top): Read persistent connection history when cache is empty.
-rw-r--r--lisp/ChangeLog45
-rw-r--r--lisp/net/tramp-cache.el5
-rw-r--r--lisp/net/tramp.el49
-rw-r--r--lisp/net/trampver.el2
4 files changed, 70 insertions, 31 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8574be35565..96cb0151619 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,24 @@
12007-08-07 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-wrong-passwd-regexp): Make the regexp more
4 global matching.
5 (tramp-handle-shell-command): Handle OUTPUT-BUFFER and
6 ERROR-BUFFER more robust. Display output.
7 (tramp-file-name-handler): Add a connection property when we found
8 a foreign file name handler. This allows backends like ftp to
9 profit also from usr/host name completion based on connection
10 cache.
11 (tramp-send-command-and-read): Search for trash after the regexp
12 until eol only. In XEmacs, there is a problem with \n.
13
14 * net/tramp-cache.el (top): Read persistent connection history
15 when cache is empty.
16
172007-08-07 Nic Ferrier <nferrier@tapsellferrier.co.uk> (tiny change)
18
19 * net/tramp.el (tramp-handle-process-file): Fix bug inserting
20 resulting output.
21
12007-08-07 Sam Steingold <sds@gnu.org> 222007-08-07 Sam Steingold <sds@gnu.org>
2 23
3 * progmodes/compile.el (compilation-start): Pass nil as startfile 24 * progmodes/compile.el (compilation-start): Pass nil as startfile
@@ -295,21 +316,21 @@
295 316
2962007-07-29 Michael Albinus <michael.albinus@gmx.de> 3172007-07-29 Michael Albinus <michael.albinus@gmx.de>
297 318
298 * tramp.el: 319 * net/tramp.el:
299 * tramp-uu.el: 320 * net/tramp-uu.el:
300 * trampver.el: Use utf-8 encoding with coding cookie. 321 * net/trampver.el: Use utf-8 encoding with coding cookie.
301 322
302 * tramp-cache.el: 323 * net/tramp-cache.el:
303 * tramp-fish.el: 324 * net/tramp-fish.el:
304 * tramp-ftp.el: 325 * net/tramp-ftp.el:
305 * tramp-gw.el: 326 * net/tramp-gw.el:
306 * tramp-smb.el: Remove coding cookie. 327 * net/tramp-smb.el: Remove coding cookie.
307 328
308 * tramp.el (tramp-handle-verify-visited-file-modtime): 329 * net/tramp.el (tramp-handle-verify-visited-file-modtime):
309 Flush buffer file-name's file property. 330 Flush buffer file-name's file property.
310 (tramp-handle-file-remote-p): The first parameter is FILENAME. 331 (tramp-handle-file-remote-p): The first parameter is FILENAME.
311 332
312 * trampver.el: Update release number. 333 * net/trampver.el: Update release number.
313 334
3142007-07-29 Juri Linkov <juri@jurta.org> 3352007-07-29 Juri Linkov <juri@jurta.org>
315 336
@@ -863,9 +884,9 @@
863 884
864 Sync with Tramp 2.1.10. 885 Sync with Tramp 2.1.10.
865 886
866 * tramp.el (tramp-get-ls-command): Fyx typo. 887 * net/tramp.el (tramp-get-ls-command): Fyx typo.
867 888
868 * trampver.el: Update release number. 889 * net/trampver.el: Update release number.
869 890
8702007-07-22 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 8912007-07-22 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
871 892
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 79b0b537837..db08fe3b6df 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -290,9 +290,8 @@ history."
290 tramp-cache-data) 290 tramp-cache-data)
291 res)) 291 res))
292 292
293;; Read persistent connection history. Applied with 293;; Read persistent connection history.
294;; `load-in-progress', because it shall be evaluated only once. 294(when (zerop (hash-table-count tramp-cache-data))
295(when load-in-progress
296 (condition-case err 295 (condition-case err
297 (with-temp-buffer 296 (with-temp-buffer
298 (insert-file-contents tramp-persistency-file-name) 297 (insert-file-contents tramp-persistency-file-name)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 5285b87313a..1070d61cba6 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1027,7 +1027,7 @@ The `sudo' program appears to insert a `^@' character into the prompt."
1027 "Login incorrect" 1027 "Login incorrect"
1028 "Login Incorrect" 1028 "Login Incorrect"
1029 "Connection refused" 1029 "Connection refused"
1030 "Connection closed by foreign host." 1030 "Connection closed"
1031 "Sorry, try again." 1031 "Sorry, try again."
1032 "Name or service not known" 1032 "Name or service not known"
1033 "Host key verification failed." 1033 "Host key verification failed."
@@ -3581,8 +3581,11 @@ beginning of local filename are not substituted."
3581 (tramp-send-command v command) 3581 (tramp-send-command v command)
3582 ;; We should show the output anyway. 3582 ;; We should show the output anyway.
3583 (when outbuf 3583 (when outbuf
3584 (with-current-buffer outbuf 3584 (let ((output-string
3585 (insert-buffer-substring (tramp-get-connection-buffer v))) 3585 (with-current-buffer (tramp-get-connection-buffer v)
3586 (buffer-substring (point-min) (point-max)))))
3587 (with-current-buffer outbuf
3588 (insert output-string)))
3586 (when display (display-buffer outbuf)))) 3589 (when display (display-buffer outbuf))))
3587 ;; When the user did interrupt, we should do it also. 3590 ;; When the user did interrupt, we should do it also.
3588 (error 3591 (error
@@ -3614,12 +3617,20 @@ beginning of local filename are not substituted."
3614 (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) 3617 (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command))
3615 (args (split-string (substring command 0 asynchronous) " ")) 3618 (args (split-string (substring command 0 asynchronous) " "))
3616 (output-buffer 3619 (output-buffer
3617 (or output-buffer 3620 (cond
3618 (if asynchronous 3621 ((bufferp output-buffer) output-buffer)
3619 "*Async Shell Command*" 3622 ((stringp output-buffer) (get-buffer-create output-buffer))
3620 "*Shell Command Output*"))) 3623 (output-buffer (current-buffer))
3624 (t (generate-new-buffer
3625 (if asynchronous
3626 "*Async Shell Command*"
3627 "*Shell Command Output*")))))
3628 (error-buffer
3629 (cond
3630 ((bufferp error-buffer) error-buffer)
3631 ((stringp error-buffer) (get-buffer-create error-buffer))))
3621 (buffer 3632 (buffer
3622 (if (and (not asynchronous) (bufferp error-buffer)) 3633 (if (and (not asynchronous) error-buffer)
3623 (with-parsed-tramp-file-name default-directory nil 3634 (with-parsed-tramp-file-name default-directory nil
3624 (list output-buffer (tramp-make-tramp-temp-file v))) 3635 (list output-buffer (tramp-make-tramp-temp-file v)))
3625 output-buffer))) 3636 output-buffer)))
@@ -3637,7 +3648,10 @@ beginning of local filename are not substituted."
3637 (when (listp buffer) 3648 (when (listp buffer)
3638 (with-current-buffer error-buffer 3649 (with-current-buffer error-buffer
3639 (insert-file-contents (cadr buffer))) 3650 (insert-file-contents (cadr buffer)))
3640 (delete-file (cadr buffer)))))) 3651 (delete-file (buffer-file-name (cadr buffer))))
3652 ;; There's some output, display it.
3653 (when (with-current-buffer output-buffer (> (point-max) (point-min)))
3654 (display-message-or-buffer output-buffer)))))
3641 3655
3642;; File Editing. 3656;; File Editing.
3643 3657
@@ -4177,8 +4191,12 @@ Falls back to normal file name handler if no tramp file name handler exists."
4177 ((and completion (zerop (length localname)) 4191 ((and completion (zerop (length localname))
4178 (memq operation '(file-name-as-directory))) 4192 (memq operation '(file-name-as-directory)))
4179 filename) 4193 filename)
4180 ;; Call the backend function. 4194 ;; Call the backend function. Set a connection property
4181 (foreign (apply foreign operation args)) 4195 ;; first, it will be reused for user/host name completion.
4196 (foreign
4197 (unless (zerop (length localname))
4198 (tramp-set-connection-property v "started" nil))
4199 (apply foreign operation args))
4182 ;; Nothing to do for us. 4200 ;; Nothing to do for us.
4183 (t (tramp-run-real-handler operation args))))))) 4201 (t (tramp-run-real-handler operation args)))))))
4184 4202
@@ -6116,7 +6134,8 @@ In case there is no valid Lisp expression, it raises an error"
6116 (condition-case nil 6134 (condition-case nil
6117 (prog1 (read (current-buffer)) 6135 (prog1 (read (current-buffer))
6118 ;; Error handling. 6136 ;; Error handling.
6119 (when (re-search-forward "\\S-" nil t) (error))) 6137 (when (re-search-forward "\\S-" (tramp-line-end-position) t)
6138 (error)))
6120 (error (tramp-error 6139 (error (tramp-error
6121 vec 'file-error 6140 vec 'file-error
6122 "`%s' does not return a valid Lisp expression: `%s'" 6141 "`%s' does not return a valid Lisp expression: `%s'"
@@ -6125,7 +6144,7 @@ In case there is no valid Lisp expression, it raises an error"
6125;; It seems that Tru64 Unix does not like it if long strings are sent 6144;; It seems that Tru64 Unix does not like it if long strings are sent
6126;; to it in one go. (This happens when sending the Perl 6145;; to it in one go. (This happens when sending the Perl
6127;; `file-attributes' implementation, for instance.) Therefore, we 6146;; `file-attributes' implementation, for instance.) Therefore, we
6128;; have this function which waits a bit at each line. 6147;; have this function which sends the string in chunks.
6129(defun tramp-send-string (vec string) 6148(defun tramp-send-string (vec string)
6130 "Send the STRING via connection VEC. 6149 "Send the STRING via connection VEC.
6131 6150
@@ -6143,7 +6162,7 @@ the remote host use line-endings as defined in the variable
6143 ;; Clean up the buffer. We cannot call `erase-buffer' because 6162 ;; Clean up the buffer. We cannot call `erase-buffer' because
6144 ;; narrowing might be in effect. 6163 ;; narrowing might be in effect.
6145 (let (buffer-read-only) (delete-region (point-min) (point-max))) 6164 (let (buffer-read-only) (delete-region (point-min) (point-max)))
6146 ;; replace "\n" by `tramp-rsh-end-of-line' 6165 ;; Replace "\n" by `tramp-rsh-end-of-line'.
6147 (setq string 6166 (setq string
6148 (mapconcat 'identity 6167 (mapconcat 'identity
6149 (split-string string "\n") 6168 (split-string string "\n")
@@ -6151,7 +6170,7 @@ the remote host use line-endings as defined in the variable
6151 (unless (or (string= string "") 6170 (unless (or (string= string "")
6152 (string-equal (substring string -1) tramp-rsh-end-of-line)) 6171 (string-equal (substring string -1) tramp-rsh-end-of-line))
6153 (setq string (concat string tramp-rsh-end-of-line))) 6172 (setq string (concat string tramp-rsh-end-of-line)))
6154 ;; send the string 6173 ;; Send the string.
6155 (if (and chunksize (not (zerop chunksize))) 6174 (if (and chunksize (not (zerop chunksize)))
6156 (let ((pos 0) 6175 (let ((pos 0)
6157 (end (length string))) 6176 (end (length string)))
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index f10f08e1031..6e48c3c7f47 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -4,7 +4,7 @@
4 4
5;; Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 5;; Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
6 6
7;; Author: Kai Großjohann <kai.grossjohann@gmx.net> 7;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
8;; Keywords: comm, processes 8;; Keywords: comm, processes
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.