aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2010-08-06 16:34:23 +0200
committerMichael Albinus2010-08-06 16:34:23 +0200
commitd00fa9b65e158e77c05cd0d64c2e3e4107de2080 (patch)
treef415cad0ad9bf49948dc1699a7d7f1d5e586a0e0
parent942415f397bd75cdc9eaf567a29cb64b96eecc5e (diff)
downloademacs-d00fa9b65e158e77c05cd0d64c2e3e4107de2080.tar.gz
emacs-d00fa9b65e158e77c05cd0d64c2e3e4107de2080.zip
* 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.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/net/tramp.el9
2 files changed, 14 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 67ff0d92079..b5d7984c04f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,4 +1,12 @@
12010-08-06 Jürgen Hötzel <juergen@archlinux.org> 12010-08-06 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-handle-start-file-process ): Set connection
4 property "vec".
5 (tramp-process-sentinel): Use it for flushing the cache. We
6 cannot do it via the process buffer, the buffer could be deleted
7 already when running the sentinel.
8
92010-08-06 Jürgen Hötzel <juergen@archlinux.org> (tiny change)
2 10
3 * comint.el (comint-mode): Make directory tracking functions 11 * comint.el (comint-mode): Make directory tracking functions
4 functional on remote files. (Bug#6764) 12 functional on remote files. (Bug#6764)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 65713580b1b..a9870823f80 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4506,10 +4506,10 @@ beginning of local filename are not substituted."
4506(defun tramp-process-sentinel (proc event) 4506(defun tramp-process-sentinel (proc event)
4507 "Flush file caches." 4507 "Flush file caches."
4508 (unless (memq (process-status proc) '(run open)) 4508 (unless (memq (process-status proc) '(run open))
4509 (with-current-buffer (process-buffer proc) 4509 (let ((vec (tramp-get-connection-property proc "vector" nil)))
4510 (with-parsed-tramp-file-name default-directory nil 4510 (when vec
4511 (tramp-message v 5 "Sentinel called: `%s' `%s'" proc event) 4511 (tramp-message vec 5 "Sentinel called: `%s' `%s'" proc event)
4512 (tramp-flush-directory-property v ""))))) 4512 (tramp-flush-directory-property vec "")))))
4513 4513
4514;; We use BUFFER also as connection buffer during setup. Because of 4514;; We use BUFFER also as connection buffer during setup. Because of
4515;; this, its original contents must be saved, and restored once 4515;; this, its original contents must be saved, and restored once
@@ -4556,6 +4556,7 @@ beginning of local filename are not substituted."
4556 v 'file-error "pty association is not supported for `%s'" name))) 4556 v 'file-error "pty association is not supported for `%s'" name)))
4557 (let ((p (tramp-get-connection-process v))) 4557 (let ((p (tramp-get-connection-process v)))
4558 ;; Set sentinel and query flag for this process. 4558 ;; Set sentinel and query flag for this process.
4559 (tramp-set-connection-property p "vector" v)
4559 (set-process-sentinel p 'tramp-process-sentinel) 4560 (set-process-sentinel p 'tramp-process-sentinel)
4560 (tramp-set-process-query-on-exit-flag p t) 4561 (tramp-set-process-query-on-exit-flag p t)
4561 ;; Return process. 4562 ;; Return process.