comparison lisp/net/tramp.el @ 95963:a20bb74ebe03

* net/tramp.el (tramp-handle-start-file-process): Clear modification time of the connection buffer. (tramp-sh-file-name-handler): Reset `tramp-locked' in case of error.
author Michael Albinus <michael.albinus@gmx.de>
date Sun, 15 Jun 2008 13:36:30 +0000
parents 926453fe3d68
children 13aa0133c5af
comparison
equal deleted inserted replaced
95962:59534766a799 95963:a20bb74ebe03
3679 (tramp-set-connection-property 3679 (tramp-set-connection-property
3680 v "process-buffer" 3680 v "process-buffer"
3681 ;; BUFFER can be nil. 3681 ;; BUFFER can be nil.
3682 (get-buffer-create (or buffer (current-buffer)))) 3682 (get-buffer-create (or buffer (current-buffer))))
3683 ;; Activate narrowing in order to save BUFFER contents. 3683 ;; Activate narrowing in order to save BUFFER contents.
3684 ;; Clear also the modification time; otherwise we might be
3685 ;; interrupted by `verify-visited-file-modtime'.
3684 (with-current-buffer (tramp-get-connection-buffer v) 3686 (with-current-buffer (tramp-get-connection-buffer v)
3687 (clear-visited-file-modtime)
3685 (narrow-to-region (point-max) (point-max))) 3688 (narrow-to-region (point-max) (point-max)))
3686 ;; Goto working directory. `tramp-send-command' opens a new 3689 ;; Goto working directory. `tramp-send-command' opens a new
3687 ;; connection. 3690 ;; connection.
3688 (tramp-send-command 3691 (tramp-send-command
3689 v (format "cd %s" (tramp-shell-quote-argument localname))) 3692 v (format "cd %s" (tramp-shell-quote-argument localname)))
4562 4565
4563 (defun tramp-sh-file-name-handler (operation &rest args) 4566 (defun tramp-sh-file-name-handler (operation &rest args)
4564 "Invoke remote-shell Tramp file name handler. 4567 "Invoke remote-shell Tramp file name handler.
4565 Fall back to normal file name handler if no Tramp handler exists." 4568 Fall back to normal file name handler if no Tramp handler exists."
4566 (when (and tramp-locked (not tramp-locker)) 4569 (when (and tramp-locked (not tramp-locker))
4570 (setq tramp-locked nil)
4567 (signal 'file-error (list "Forbidden reentrant call of Tramp"))) 4571 (signal 'file-error (list "Forbidden reentrant call of Tramp")))
4568 (let ((tl tramp-locked)) 4572 (let ((tl tramp-locked))
4569 (unwind-protect 4573 (unwind-protect
4570 (progn 4574 (progn
4571 (setq tramp-locked t) 4575 (setq tramp-locked t)
7513 ;; * Reconnect directly to a compliant shell without first going 7517 ;; * Reconnect directly to a compliant shell without first going
7514 ;; through the user's default shell. (Pete Forman) 7518 ;; through the user's default shell. (Pete Forman)
7515 ;; * Make `tramp-default-user' obsolete. 7519 ;; * Make `tramp-default-user' obsolete.
7516 ;; * Tramp shall reconnect automatically to its ssh connection when it 7520 ;; * Tramp shall reconnect automatically to its ssh connection when it
7517 ;; detects that the process "has died". (David Reitter) 7521 ;; detects that the process "has died". (David Reitter)
7522 ;; * How can I interrupt the remote process with a signal
7523 ;; (interrupt-process seems not to work)? (Markus Triska)
7518 7524
7519 ;; Functions for file-name-handler-alist: 7525 ;; Functions for file-name-handler-alist:
7520 ;; diff-latest-backup-file -- in diff.el 7526 ;; diff-latest-backup-file -- in diff.el
7521 ;; dired-uncache -- this will be needed when we do insert-directory caching 7527 ;; dired-uncache -- this will be needed when we do insert-directory caching
7522 ;; file-name-as-directory -- use primitive? 7528 ;; file-name-as-directory -- use primitive?