aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2010-07-28 12:02:18 +0200
committerMichael Albinus2010-07-28 12:02:18 +0200
commit8fbcce2d5a7bfa1a9bf4648408d688d175b1a4ee (patch)
treeb7d0c84d4b6bfeb8b32ca8457f5fe3e252e47ab2
parent128440c97f540ae93a6579985292425d5f8a1cea (diff)
downloademacs-8fbcce2d5a7bfa1a9bf4648408d688d175b1a4ee.tar.gz
emacs-8fbcce2d5a7bfa1a9bf4648408d688d175b1a4ee.zip
* net/tramp.el (tramp-methods): Move hostname to the end in all
ssh `tramp-login-args'. (tramp-verbose): Describe verbose level 9. (tramp-open-shell): Check for tty if `tramp-verbose' >= 9. (tramp-open-connection-setup-interactive-shell): Trace stty settings if `tramp-verbose' >= 9. (tramp-handle-start-file-process): Implement tty setting. (Bug#4604, Bug#6360) * net/tramp-cmds.el (tramp-bug): Recommend setting of `tramp-verbose' to 9.
-rw-r--r--lisp/ChangeLog14
-rw-r--r--lisp/net/tramp-cmds.el2
-rw-r--r--lisp/net/tramp.el88
3 files changed, 66 insertions, 38 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c8fb46acf4e..6d329d663ab 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,17 @@
12010-07-28 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-methods): Move hostname to the end in all
4 ssh `tramp-login-args'.
5 (tramp-verbose): Describe verbose level 9.
6 (tramp-open-shell): Check for tty if `tramp-verbose' >= 9.
7 (tramp-open-connection-setup-interactive-shell): Trace stty
8 settings if `tramp-verbose' >= 9.
9 (tramp-handle-start-file-process): Implement tty setting.
10 (Bug#4604, Bug#6360)
11
12 * net/tramp-cmds.el (tramp-bug): Recommend setting of
13 `tramp-verbose' to 9.
14
12010-07-27 Aaron S. Hawley <ashawley@burlingtontelecom.net> 152010-07-27 Aaron S. Hawley <ashawley@burlingtontelecom.net>
2 16
3 * emacs-lisp/re-builder.el (reb-re-syntax, reb-lisp-mode) 17 * emacs-lisp/re-builder.el (reb-re-syntax, reb-lisp-mode)
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index 86501561238..0e31360a416 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -225,7 +225,7 @@ Before reproducing the bug, you might apply
225This allows to investigate from a clean environment. Another 225This allows to investigate from a clean environment. Another
226useful thing to do is to put 226useful thing to do is to put
227 227
228 (setq tramp-verbose 8) 228 (setq tramp-verbose 9)
229 229
230in the ~/.emacs file and to repeat the bug. Then, include the 230in the ~/.emacs file and to repeat the bug. Then, include the
231contents of the *tramp/foo* buffer and the *debug tramp/foo* 231contents of the *tramp/foo* buffer and the *debug tramp/foo*
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 2a4f57e2045..6256c8c631d 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -200,6 +200,7 @@ Any level x includes messages for all levels 1 .. x-1. The levels are
200 6 sent and received strings 200 6 sent and received strings
201 7 file caching 201 7 file caching
202 8 connection properties 202 8 connection properties
203 9 test commands
20310 traces (huge)." 20410 traces (huge)."
204 :group 'tramp 205 :group 'tramp
205 :type 'integer) 206 :type 'integer)
@@ -332,8 +333,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
332 (tramp-copy-recursive t) 333 (tramp-copy-recursive t)
333 (tramp-password-end-of-line nil)) 334 (tramp-password-end-of-line nil))
334 ("scp" (tramp-login-program "ssh") 335 ("scp" (tramp-login-program "ssh")
335 (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") 336 (tramp-login-args (("-l" "%u") ("-p" "%p")
336 ("-e" "none"))) 337 ("-e" "none") ("%h")))
337 (tramp-async-args (("-q"))) 338 (tramp-async-args (("-q")))
338 (tramp-remote-sh "/bin/sh") 339 (tramp-remote-sh "/bin/sh")
339 (tramp-copy-program "scp") 340 (tramp-copy-program "scp")
@@ -348,8 +349,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
348 ("-o" "StrictHostKeyChecking=no"))) 349 ("-o" "StrictHostKeyChecking=no")))
349 (tramp-default-port 22)) 350 (tramp-default-port 22))
350 ("scp1" (tramp-login-program "ssh") 351 ("scp1" (tramp-login-program "ssh")
351 (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") 352 (tramp-login-args (("-l" "%u") ("-p" "%p")
352 ("-1" "-e" "none"))) 353 ("-1") ("-e" "none") ("%h")))
353 (tramp-async-args (("-q"))) 354 (tramp-async-args (("-q")))
354 (tramp-remote-sh "/bin/sh") 355 (tramp-remote-sh "/bin/sh")
355 (tramp-copy-program "scp") 356 (tramp-copy-program "scp")
@@ -364,8 +365,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
364 ("-o" "StrictHostKeyChecking=no"))) 365 ("-o" "StrictHostKeyChecking=no")))
365 (tramp-default-port 22)) 366 (tramp-default-port 22))
366 ("scp2" (tramp-login-program "ssh") 367 ("scp2" (tramp-login-program "ssh")
367 (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") 368 (tramp-login-args (("-l" "%u") ("-p" "%p")
368 ("-2" "-e" "none"))) 369 ("-2") ("-e" "none") ("%h")))
369 (tramp-async-args (("-q"))) 370 (tramp-async-args (("-q")))
370 (tramp-remote-sh "/bin/sh") 371 (tramp-remote-sh "/bin/sh")
371 (tramp-copy-program "scp") 372 (tramp-copy-program "scp")
@@ -400,8 +401,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
400 (tramp-copy-recursive t) 401 (tramp-copy-recursive t)
401 (tramp-password-end-of-line nil)) 402 (tramp-password-end-of-line nil))
402 ("sftp" (tramp-login-program "ssh") 403 ("sftp" (tramp-login-program "ssh")
403 (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") 404 (tramp-login-args (("-l" "%u") ("-p" "%p")
404 ("-e" "none"))) 405 ("-e" "none") ("%h")))
405 (tramp-async-args (("-q"))) 406 (tramp-async-args (("-q")))
406 (tramp-remote-sh "/bin/sh") 407 (tramp-remote-sh "/bin/sh")
407 (tramp-copy-program "sftp") 408 (tramp-copy-program "sftp")
@@ -409,8 +410,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
409 (tramp-copy-keep-date nil) 410 (tramp-copy-keep-date nil)
410 (tramp-password-end-of-line nil)) 411 (tramp-password-end-of-line nil))
411 ("rsync" (tramp-login-program "ssh") 412 ("rsync" (tramp-login-program "ssh")
412 (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") 413 (tramp-login-args (("-l" "%u") ("-p" "%p")
413 ("-e" "none"))) 414 ("-e" "none") ("%h")))
414 (tramp-async-args (("-q"))) 415 (tramp-async-args (("-q")))
415 (tramp-remote-sh "/bin/sh") 416 (tramp-remote-sh "/bin/sh")
416 (tramp-copy-program "rsync") 417 (tramp-copy-program "rsync")
@@ -421,10 +422,10 @@ detected as prompt when being sent on echoing hosts, therefore.")
421 (tramp-password-end-of-line nil)) 422 (tramp-password-end-of-line nil))
422 ("rsyncc" 423 ("rsyncc"
423 (tramp-login-program "ssh") 424 (tramp-login-program "ssh")
424 (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") 425 (tramp-login-args (("-l" "%u") ("-p" "%p")
425 ("-o" "ControlPath=%t.%%r@%%h:%%p") 426 ("-o" "ControlPath=%t.%%r@%%h:%%p")
426 ("-o" "ControlMaster=yes") 427 ("-o" "ControlMaster=yes")
427 ("-e" "none"))) 428 ("-e" "none") ("%h")))
428 (tramp-async-args (("-q"))) 429 (tramp-async-args (("-q")))
429 (tramp-remote-sh "/bin/sh") 430 (tramp-remote-sh "/bin/sh")
430 (tramp-copy-program "rsync") 431 (tramp-copy-program "rsync")
@@ -453,8 +454,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
453 (tramp-copy-keep-date nil) 454 (tramp-copy-keep-date nil)
454 (tramp-password-end-of-line nil)) 455 (tramp-password-end-of-line nil))
455 ("ssh" (tramp-login-program "ssh") 456 ("ssh" (tramp-login-program "ssh")
456 (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") 457 (tramp-login-args (("-l" "%u") ("-p" "%p")
457 ("-e" "none"))) 458 ("-e" "none") ("%h")))
458 (tramp-async-args (("-q"))) 459 (tramp-async-args (("-q")))
459 (tramp-remote-sh "/bin/sh") 460 (tramp-remote-sh "/bin/sh")
460 (tramp-copy-program nil) 461 (tramp-copy-program nil)
@@ -467,8 +468,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
467 ("-o" "StrictHostKeyChecking=no"))) 468 ("-o" "StrictHostKeyChecking=no")))
468 (tramp-default-port 22)) 469 (tramp-default-port 22))
469 ("ssh1" (tramp-login-program "ssh") 470 ("ssh1" (tramp-login-program "ssh")
470 (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") 471 (tramp-login-args (("-l" "%u") ("-p" "%p")
471 ("-1" "-e" "none"))) 472 ("-1") ("-e" "none") ("%h")))
472 (tramp-async-args (("-q"))) 473 (tramp-async-args (("-q")))
473 (tramp-remote-sh "/bin/sh") 474 (tramp-remote-sh "/bin/sh")
474 (tramp-copy-program nil) 475 (tramp-copy-program nil)
@@ -481,8 +482,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
481 ("-o" "StrictHostKeyChecking=no"))) 482 ("-o" "StrictHostKeyChecking=no")))
482 (tramp-default-port 22)) 483 (tramp-default-port 22))
483 ("ssh2" (tramp-login-program "ssh") 484 ("ssh2" (tramp-login-program "ssh")
484 (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") 485 (tramp-login-args (("-l" "%u") ("-p" "%p")
485 ("-2" "-e" "none"))) 486 ("-2") ("-e" "none") ("%h")))
486 (tramp-async-args (("-q"))) 487 (tramp-async-args (("-q")))
487 (tramp-remote-sh "/bin/sh") 488 (tramp-remote-sh "/bin/sh")
488 (tramp-copy-program nil) 489 (tramp-copy-program nil)
@@ -545,10 +546,10 @@ detected as prompt when being sent on echoing hosts, therefore.")
545 (tramp-copy-keep-date nil) 546 (tramp-copy-keep-date nil)
546 (tramp-password-end-of-line nil)) 547 (tramp-password-end-of-line nil))
547 ("scpc" (tramp-login-program "ssh") 548 ("scpc" (tramp-login-program "ssh")
548 (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") 549 (tramp-login-args (("-l" "%u") ("-p" "%p")
549 ("-o" "ControlPath=%t.%%r@%%h:%%p") 550 ("-o" "ControlPath=%t.%%r@%%h:%%p")
550 ("-o" "ControlMaster=yes") 551 ("-o" "ControlMaster=yes")
551 ("-e" "none"))) 552 ("-e" "none") ("%h")))
552 (tramp-async-args (("-q"))) 553 (tramp-async-args (("-q")))
553 (tramp-remote-sh "/bin/sh") 554 (tramp-remote-sh "/bin/sh")
554 (tramp-copy-program "scp") 555 (tramp-copy-program "scp")
@@ -563,8 +564,9 @@ detected as prompt when being sent on echoing hosts, therefore.")
563 ("-o" "StrictHostKeyChecking=no"))) 564 ("-o" "StrictHostKeyChecking=no")))
564 (tramp-default-port 22)) 565 (tramp-default-port 22))
565 ("scpx" (tramp-login-program "ssh") 566 ("scpx" (tramp-login-program "ssh")
566 (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") 567 (tramp-login-args (("-l" "%u") ("-p" "%p")
567 ("-e" "none" "-t" "-t" "/bin/sh"))) 568 ("-e" "none") ("-t" "-t")
569 ("%h") ("/bin/sh")))
568 (tramp-async-args (("-q"))) 570 (tramp-async-args (("-q")))
569 (tramp-remote-sh "/bin/sh") 571 (tramp-remote-sh "/bin/sh")
570 (tramp-copy-program "scp") 572 (tramp-copy-program "scp")
@@ -577,8 +579,9 @@ detected as prompt when being sent on echoing hosts, therefore.")
577 ("-o" "StrictHostKeyChecking=no"))) 579 ("-o" "StrictHostKeyChecking=no")))
578 (tramp-default-port 22)) 580 (tramp-default-port 22))
579 ("sshx" (tramp-login-program "ssh") 581 ("sshx" (tramp-login-program "ssh")
580 (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") 582 (tramp-login-args (("-l" "%u") ("-p" "%p")
581 ("-e" "none" "-t" "-t" "/bin/sh"))) 583 ("-e" "none") ("-t" "-t")
584 ("%h") ("/bin/sh")))
582 (tramp-async-args (("-q"))) 585 (tramp-async-args (("-q")))
583 (tramp-remote-sh "/bin/sh") 586 (tramp-remote-sh "/bin/sh")
584 (tramp-copy-program nil) 587 (tramp-copy-program nil)
@@ -4506,14 +4509,16 @@ beginning of local filename are not substituted."
4506(defun tramp-handle-start-file-process (name buffer program &rest args) 4509(defun tramp-handle-start-file-process (name buffer program &rest args)
4507 "Like `start-file-process' for Tramp files." 4510 "Like `start-file-process' for Tramp files."
4508 (with-parsed-tramp-file-name default-directory nil 4511 (with-parsed-tramp-file-name default-directory nil
4509 (unless (stringp program)
4510 (tramp-error
4511 v 'file-error "pty association is not supported for `%s'" name))
4512 (unwind-protect 4512 (unwind-protect
4513 (let ((command (format "cd %s; exec %s" 4513 ;; When PROGRAM is nil, we just provide a tty.
4514 (tramp-shell-quote-argument localname) 4514 (let ((command
4515 (mapconcat 'tramp-shell-quote-argument 4515 (when (stringp program)
4516 (cons program args) " "))) 4516 (format "cd %s; exec %s"
4517 (tramp-shell-quote-argument localname)
4518 (mapconcat 'tramp-shell-quote-argument
4519 (cons program args) " "))))
4520 (tramp-process-connection-type
4521 (or (null program) tramp-process-connection-type))
4517 (name1 name) 4522 (name1 name)
4518 (i 0)) 4523 (i 0))
4519 (unless buffer 4524 (unless buffer
@@ -4533,9 +4538,16 @@ beginning of local filename are not substituted."
4533 (with-current-buffer (tramp-get-connection-buffer v) 4538 (with-current-buffer (tramp-get-connection-buffer v)
4534 (clear-visited-file-modtime) 4539 (clear-visited-file-modtime)
4535 (narrow-to-region (point-max) (point-max))) 4540 (narrow-to-region (point-max) (point-max)))
4536 ;; Send the command. `tramp-send-command' opens a new 4541 (if (stringp program)
4537 ;; connection. 4542 ;; Send the command. `tramp-send-command' opens a new
4538 (tramp-send-command v command nil t) ; nooutput 4543 ;; connection.
4544 (tramp-send-command v command nil t) ; nooutput
4545 ;; Check, whether a pty is associated, and set it as
4546 ;; process property.
4547 (condition-case nil
4548 (tramp-send-command-and-read v "echo \\\"`tty`\\\"")
4549 (tramp-error
4550 v 'file-error "pty association is not supported for `%s'" name)))
4539 ;; Set query flag for this process. 4551 ;; Set query flag for this process.
4540 (tramp-set-process-query-on-exit-flag 4552 (tramp-set-process-query-on-exit-flag
4541 (tramp-get-connection-process v) t) 4553 (tramp-get-connection-process v) t)
@@ -6619,7 +6631,10 @@ file exists and nonzero exit status otherwise."
6619 vec (format "PS1=%s" (shell-quote-argument tramp-end-of-output)) t) 6631 vec (format "PS1=%s" (shell-quote-argument tramp-end-of-output)) t)
6620 (tramp-send-command vec "PS2=''" t) 6632 (tramp-send-command vec "PS2=''" t)
6621 (tramp-send-command vec "PS3=''" t) 6633 (tramp-send-command vec "PS3=''" t)
6622 (tramp-send-command vec "PROMPT_COMMAND=''" t))) 6634 (tramp-send-command vec "PROMPT_COMMAND=''" t)
6635 ;; Dump tty in the traces.
6636 (when (>= tramp-verbose 9)
6637 (tramp-send-command vec "tty" t))))
6623 6638
6624(defun tramp-find-shell (vec) 6639(defun tramp-find-shell (vec)
6625 "Opens a shell on the remote host which groks tilde expansion." 6640 "Opens a shell on the remote host which groks tilde expansion."
@@ -6984,7 +6999,7 @@ process to set up. VEC specifies the connection."
6984 ;; stty, instead. 6999 ;; stty, instead.
6985 (tramp-send-command vec "stty -onlcr" t)))) 7000 (tramp-send-command vec "stty -onlcr" t))))
6986 ;; Dump stty settings in the traces. 7001 ;; Dump stty settings in the traces.
6987 (when (>= tramp-verbose 10) 7002 (when (>= tramp-verbose 9)
6988 (tramp-send-command vec "stty -a" t)) 7003 (tramp-send-command vec "stty -a" t))
6989 (tramp-send-command vec "set +o vi +o emacs" t) 7004 (tramp-send-command vec "set +o vi +o emacs" t)
6990 7005
@@ -8950,7 +8965,6 @@ Only works for Bourne-like shells."
8950;; rsync). 8965;; rsync).
8951;; * Keep a second connection open for out-of-band methods like scp or 8966;; * Keep a second connection open for out-of-band methods like scp or
8952;; rsync. 8967;; rsync.
8953;; * Support ptys in `tramp-handle-start-file-process'. (Bug#4604, Bug#6360)
8954;; * IMHO, it's a drawback that currently Tramp doesn't support 8968;; * IMHO, it's a drawback that currently Tramp doesn't support
8955;; Unicode in Dired file names by default. Is it possible to 8969;; Unicode in Dired file names by default. Is it possible to
8956;; improve Tramp to set LC_ALL to "C" only for commands where Tramp 8970;; improve Tramp to set LC_ALL to "C" only for commands where Tramp