# HG changeset patch # User Michael Albinus # Date 1281105263 -7200 # Node ID 6387fbfcb44de0394c0acfa80e9ecc6db53f241e # Parent 8865dff431b0083704139bee3a4b7f16e433f7f9 * net/tramp.el (tramp-handle-start-file-process ): Set connection property "vec". (tramp-process-sentinel): Use it for flushing the cache. We cannot do it via the process buffer, the buffer could be deleted already when running the sentinel. diff -r 8865dff431b0 -r 6387fbfcb44d lisp/ChangeLog --- a/lisp/ChangeLog Fri Aug 06 15:53:59 2010 +0200 +++ b/lisp/ChangeLog Fri Aug 06 16:34:23 2010 +0200 @@ -1,4 +1,12 @@ -2010-08-06 Jürgen Hötzel +2010-08-06 Michael Albinus + + * net/tramp.el (tramp-handle-start-file-process ): Set connection + property "vec". + (tramp-process-sentinel): Use it for flushing the cache. We + cannot do it via the process buffer, the buffer could be deleted + already when running the sentinel. + +2010-08-06 Jürgen Hötzel (tiny change) * comint.el (comint-mode): Make directory tracking functions functional on remote files. (Bug#6764) diff -r 8865dff431b0 -r 6387fbfcb44d lisp/net/tramp.el --- a/lisp/net/tramp.el Fri Aug 06 15:53:59 2010 +0200 +++ b/lisp/net/tramp.el Fri Aug 06 16:34:23 2010 +0200 @@ -4506,10 +4506,10 @@ (defun tramp-process-sentinel (proc event) "Flush file caches." (unless (memq (process-status proc) '(run open)) - (with-current-buffer (process-buffer proc) - (with-parsed-tramp-file-name default-directory nil - (tramp-message v 5 "Sentinel called: `%s' `%s'" proc event) - (tramp-flush-directory-property v ""))))) + (let ((vec (tramp-get-connection-property proc "vector" nil))) + (when vec + (tramp-message vec 5 "Sentinel called: `%s' `%s'" proc event) + (tramp-flush-directory-property vec ""))))) ;; We use BUFFER also as connection buffer during setup. Because of ;; this, its original contents must be saved, and restored once @@ -4556,6 +4556,7 @@ v 'file-error "pty association is not supported for `%s'" name))) (let ((p (tramp-get-connection-process v))) ;; Set sentinel and query flag for this process. + (tramp-set-connection-property p "vector" v) (set-process-sentinel p 'tramp-process-sentinel) (tramp-set-process-query-on-exit-flag p t) ;; Return process.