Fix Tramp error handling process buffer
* lisp/net/tramp-cache.el (tramp-list-connections): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): Use connection property " connected" for a check of active connections. * lisp/net/tramp.el (tramp-get-buffer): Set connection property " connected".
This commit is contained in:
parent
cce6a57af7
commit
40a8d0ebf0
3 changed files with 6 additions and 5 deletions
|
@ -554,7 +554,7 @@ PROPERTIES is a list of file properties (strings)."
|
|||
(lambda (key)
|
||||
(and (tramp-file-name-p key)
|
||||
(null (tramp-file-name-localname key))
|
||||
(tramp-connection-property-p key " process-buffer")
|
||||
(tramp-connection-property-p key " connected")
|
||||
key))
|
||||
(hash-table-keys tramp-cache-data))))
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ interactively, a Tramp connection has to be selected."
|
|||
(get-buffer (tramp-debug-buffer-name vec)))
|
||||
(unless keep-debug
|
||||
(get-buffer (tramp-trace-buffer-name vec)))
|
||||
(tramp-get-connection-property vec " process-buffer")))
|
||||
(tramp-get-connection-property vec " connected")))
|
||||
(when (bufferp buf) (kill-buffer buf)))
|
||||
|
||||
;; Flush file cache.
|
||||
|
|
|
@ -2002,10 +2002,11 @@ Unless DONT-CREATE, the buffer is created when it doesn't exist yet."
|
|||
(or (get-buffer (tramp-buffer-name vec))
|
||||
(unless dont-create
|
||||
(with-current-buffer (get-buffer-create (tramp-buffer-name vec))
|
||||
;; We use the existence of connection property " process-buffer"
|
||||
;; as indication, whether a connection is active.
|
||||
;; We use the existence of connection property " connected"
|
||||
;; as indication, whether a connection is active. It keeps
|
||||
;; the connection buffer, for cleanup.
|
||||
(tramp-set-connection-property
|
||||
vec " process-buffer"
|
||||
vec " connected"
|
||||
(tramp-get-connection-property vec " process-buffer"))
|
||||
(setq buffer-undo-list t
|
||||
default-directory
|
||||
|
|
Loading…
Add table
Reference in a new issue