+2007-08-07 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-wrong-passwd-regexp): Make the regexp more
+ global matching.
+ (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.
+
+2007-08-07 Nic Ferrier <nferrier@tapsellferrier.co.uk> (tiny change)
+
+ * net/tramp.el (tramp-handle-process-file): Fix bug inserting
+ resulting output.
+
2007-08-07 Sam Steingold <sds@gnu.org>
* progmodes/compile.el (compilation-start): Pass nil as startfile
2007-07-29 Michael Albinus <michael.albinus@gmx.de>
- * tramp.el:
- * tramp-uu.el:
- * trampver.el: Use utf-8 encoding with coding cookie.
+ * net/tramp.el:
+ * net/tramp-uu.el:
+ * net/trampver.el: Use utf-8 encoding with coding cookie.
- * tramp-cache.el:
- * tramp-fish.el:
- * tramp-ftp.el:
- * tramp-gw.el:
- * tramp-smb.el: Remove coding cookie.
+ * net/tramp-cache.el:
+ * net/tramp-fish.el:
+ * net/tramp-ftp.el:
+ * net/tramp-gw.el:
+ * net/tramp-smb.el: Remove coding cookie.
- * tramp.el (tramp-handle-verify-visited-file-modtime):
+ * net/tramp.el (tramp-handle-verify-visited-file-modtime):
Flush buffer file-name's file property.
(tramp-handle-file-remote-p): The first parameter is FILENAME.
- * trampver.el: Update release number.
+ * net/trampver.el: Update release number.
2007-07-29 Juri Linkov <juri@jurta.org>
Sync with Tramp 2.1.10.
- * tramp.el (tramp-get-ls-command): Fyx typo.
+ * net/tramp.el (tramp-get-ls-command): Fyx typo.
- * trampver.el: Update release number.
+ * net/trampver.el: Update release number.
2007-07-22 Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
"Login incorrect"
"Login Incorrect"
"Connection refused"
- "Connection closed by foreign host."
+ "Connection closed"
"Sorry, try again."
"Name or service not known"
"Host key verification failed."
(tramp-send-command v command)
;; We should show the output anyway.
(when outbuf
- (with-current-buffer outbuf
- (insert-buffer-substring (tramp-get-connection-buffer v)))
+ (let ((output-string
+ (with-current-buffer (tramp-get-connection-buffer v)
+ (buffer-substring (point-min) (point-max)))))
+ (with-current-buffer outbuf
+ (insert output-string)))
(when display (display-buffer outbuf))))
;; When the user did interrupt, we should do it also.
(error
(let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command))
(args (split-string (substring command 0 asynchronous) " "))
(output-buffer
- (or output-buffer
- (if asynchronous
- "*Async Shell Command*"
- "*Shell Command Output*")))
+ (cond
+ ((bufferp output-buffer) output-buffer)
+ ((stringp output-buffer) (get-buffer-create output-buffer))
+ (output-buffer (current-buffer))
+ (t (generate-new-buffer
+ (if asynchronous
+ "*Async Shell Command*"
+ "*Shell Command Output*")))))
+ (error-buffer
+ (cond
+ ((bufferp error-buffer) error-buffer)
+ ((stringp error-buffer) (get-buffer-create error-buffer))))
(buffer
- (if (and (not asynchronous) (bufferp error-buffer))
+ (if (and (not asynchronous) error-buffer)
(with-parsed-tramp-file-name default-directory nil
(list output-buffer (tramp-make-tramp-temp-file v)))
output-buffer)))
(when (listp buffer)
(with-current-buffer error-buffer
(insert-file-contents (cadr buffer)))
- (delete-file (cadr buffer))))))
+ (delete-file (buffer-file-name (cadr buffer))))
+ ;; There's some output, display it.
+ (when (with-current-buffer output-buffer (> (point-max) (point-min)))
+ (display-message-or-buffer output-buffer)))))
;; File Editing.
((and completion (zerop (length localname))
(memq operation '(file-name-as-directory)))
filename)
- ;; Call the backend function.
- (foreign (apply foreign operation args))
+ ;; Call the backend function. Set a connection property
+ ;; first, it will be reused for user/host name completion.
+ (foreign
+ (unless (zerop (length localname))
+ (tramp-set-connection-property v "started" nil))
+ (apply foreign operation args))
;; Nothing to do for us.
(t (tramp-run-real-handler operation args)))))))
(condition-case nil
(prog1 (read (current-buffer))
;; Error handling.
- (when (re-search-forward "\\S-" nil t) (error)))
+ (when (re-search-forward "\\S-" (tramp-line-end-position) t)
+ (error)))
(error (tramp-error
vec 'file-error
"`%s' does not return a valid Lisp expression: `%s'"
;; It seems that Tru64 Unix does not like it if long strings are sent
;; to it in one go. (This happens when sending the Perl
;; `file-attributes' implementation, for instance.) Therefore, we
-;; have this function which waits a bit at each line.
+;; have this function which sends the string in chunks.
(defun tramp-send-string (vec string)
"Send the STRING via connection VEC.
;; Clean up the buffer. We cannot call `erase-buffer' because
;; narrowing might be in effect.
(let (buffer-read-only) (delete-region (point-min) (point-max)))
- ;; replace "\n" by `tramp-rsh-end-of-line'
+ ;; Replace "\n" by `tramp-rsh-end-of-line'.
(setq string
(mapconcat 'identity
(split-string string "\n")
(unless (or (string= string "")
(string-equal (substring string -1) tramp-rsh-end-of-line))
(setq string (concat string tramp-rsh-end-of-line)))
- ;; send the string
+ ;; Send the string.
(if (and chunksize (not (zerop chunksize)))
(let ((pos 0)
(end (length string)))