aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2025-01-19 11:30:10 +0100
committerMichael Albinus2025-01-19 11:30:10 +0100
commit40a8d0ebf0ca6199697c95a308201e739dd9540d (patch)
tree049aad89768811f18ac6a8d65d3a9b7fe7740d4f
parentcce6a57af7cff36936340a6a43be73ccfcadea5f (diff)
downloademacs-40a8d0ebf0ca6199697c95a308201e739dd9540d.tar.gz
emacs-40a8d0ebf0ca6199697c95a308201e739dd9540d.zip
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".
-rw-r--r--lisp/net/tramp-cache.el2
-rw-r--r--lisp/net/tramp-cmds.el2
-rw-r--r--lisp/net/tramp.el7
3 files changed, 6 insertions, 5 deletions
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 95fff9db0b4..d432deee5d1 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -554,7 +554,7 @@ PROPERTIES is a list of file properties (strings)."
554 (lambda (key) 554 (lambda (key)
555 (and (tramp-file-name-p key) 555 (and (tramp-file-name-p key)
556 (null (tramp-file-name-localname key)) 556 (null (tramp-file-name-localname key))
557 (tramp-connection-property-p key " process-buffer") 557 (tramp-connection-property-p key " connected")
558 key)) 558 key))
559 (hash-table-keys tramp-cache-data)))) 559 (hash-table-keys tramp-cache-data))))
560 560
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index a469df1b872..71829e81093 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -173,7 +173,7 @@ interactively, a Tramp connection has to be selected."
173 (get-buffer (tramp-debug-buffer-name vec))) 173 (get-buffer (tramp-debug-buffer-name vec)))
174 (unless keep-debug 174 (unless keep-debug
175 (get-buffer (tramp-trace-buffer-name vec))) 175 (get-buffer (tramp-trace-buffer-name vec)))
176 (tramp-get-connection-property vec " process-buffer"))) 176 (tramp-get-connection-property vec " connected")))
177 (when (bufferp buf) (kill-buffer buf))) 177 (when (bufferp buf) (kill-buffer buf)))
178 178
179 ;; Flush file cache. 179 ;; Flush file cache.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 1241d321b9b..d87cecb9ec6 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2002,10 +2002,11 @@ Unless DONT-CREATE, the buffer is created when it doesn't exist yet."
2002 (or (get-buffer (tramp-buffer-name vec)) 2002 (or (get-buffer (tramp-buffer-name vec))
2003 (unless dont-create 2003 (unless dont-create
2004 (with-current-buffer (get-buffer-create (tramp-buffer-name vec)) 2004 (with-current-buffer (get-buffer-create (tramp-buffer-name vec))
2005 ;; We use the existence of connection property " process-buffer" 2005 ;; We use the existence of connection property " connected"
2006 ;; as indication, whether a connection is active. 2006 ;; as indication, whether a connection is active. It keeps
2007 ;; the connection buffer, for cleanup.
2007 (tramp-set-connection-property 2008 (tramp-set-connection-property
2008 vec " process-buffer" 2009 vec " connected"
2009 (tramp-get-connection-property vec " process-buffer")) 2010 (tramp-get-connection-property vec " process-buffer"))
2010 (setq buffer-undo-list t 2011 (setq buffer-undo-list t
2011 default-directory 2012 default-directory