]> git.eshelyaron.com Git - emacs.git/commitdiff
; Tramp cosmetic change
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 25 Sep 2024 09:36:28 +0000 (11:36 +0200)
committerEshel Yaron <me@eshelyaron.com>
Fri, 27 Sep 2024 10:20:31 +0000 (12:20 +0200)
* lisp/net/tramp.el (tramp-file-name-handler):
Adapt `tramp-verbose' when completing host names.

(cherry picked from commit 29c610a83243c82aeb1bfefea26adad0b34ff011)

lisp/net/tramp.el

index 6d1cee041e6799e13fd38a16ae0bc5a063e6afe6..80e3d63623acde8d3a5a0f29d1773ed1623d077f 100644 (file)
@@ -2478,8 +2478,11 @@ Fall back to normal file name handler if no Tramp file name handler exists."
                          ;; We flush connection properties
                          ;; "process-name" and "process-buffer",
                          ;; because the operations shall be applied
-                         ;; in the main connection process.
-                          ;; If `non-essential' is non-nil, Tramp shall
+                         ;; in the main connection process.  In order
+                         ;; to avoid suspicious debug buffers during
+                         ;; host name completion, we adapt
+                         ;; `tramp-verbose'.
+                         ;; If `non-essential' is non-nil, Tramp shall
                          ;; not open a new connection.
                          ;; If Tramp detects that it shouldn't continue
                          ;; to work, it throws the `suppress' event.
@@ -2489,8 +2492,11 @@ Fall back to normal file name handler if no Tramp file name handler exists."
                          ;; In both cases, we try the default handler then.
                          (with-tramp-saved-connection-properties
                              v '("process-name" "process-buffer")
-                           (tramp-flush-connection-property v "process-name")
-                           (tramp-flush-connection-property v "process-buffer")
+                           (let ((tramp-verbose
+                                  (if minibuffer-completing-file-name
+                                      0 tramp-verbose)))
+                             (tramp-flush-connection-property v "process-name")
+                             (tramp-flush-connection-property v "process-buffer"))
                            (setq result
                                  (catch 'non-essential
                                    (catch 'suppress