]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Tramp error handling process buffer
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 19 Jan 2025 10:30:10 +0000 (11:30 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 20 Jan 2025 15:58:38 +0000 (16:58 +0100)
* 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".

(cherry picked from commit 40a8d0ebf0ca6199697c95a308201e739dd9540d)

lisp/net/tramp-cache.el
lisp/net/tramp-cmds.el
lisp/net/tramp.el

index 80a490cdbc658b34e92bc311c7cfae65a9e261fe..1625eb8e8f9182756ef86fd8e08f916c20cff116 100644 (file)
@@ -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))))
 
index fd86066a34c79c257eb27de2608ad6dd4380db3f..7d88fcefb34dadc01b8b4608ac24e9a8f41469d1 100644 (file)
@@ -171,7 +171,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.
index 507bb243497d3b0a6aeffdca6ba6451dc2174785..25d977fd4f1c0bea1036241944e8decd0333e89a 100644 (file)
@@ -2005,10 +2005,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