]> git.eshelyaron.com Git - emacs.git/commitdiff
Some minor Tramp fixes
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 17 May 2022 07:13:34 +0000 (09:13 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 17 May 2022 07:13:34 +0000 (09:13 +0200)
* lisp/net/tramp-cmds.el (tramp-list-tramp-buffers)
(tramp-list-remote-buffers): Add ;;;###tramp-autoload cookie.

* lisp/net/tramp-fuse.el (tramp-fuse-remove-hidden-files): New defvar.
(tramp-fuse-remove-hidden-files): Use it.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handler-askquestion):
Keep regression tests running.

lisp/net/tramp-cmds.el
lisp/net/tramp-fuse.el
lisp/net/tramp-gvfs.el

index 43aed6255501b0810e5d47b628695e2289fa22a9..8e359c382bff9b66a1675924016a23716ba55b21 100644 (file)
@@ -51,6 +51,7 @@ SYNTAX can be one of the symbols `default' (default),
   (when syntax
     (customize-set-variable 'tramp-syntax syntax)))
 
+;;;###tramp-autoload
 (defun tramp-list-tramp-buffers ()
   "Return a list of all Tramp connection buffers."
   (append
@@ -61,6 +62,7 @@ SYNTAX can be one of the symbols `default' (default),
    (all-completions
     "*trace tramp" (mapcar #'list (mapcar #'buffer-name (buffer-list))))))
 
+;;;###tramp-autoload
 (defun tramp-list-remote-buffers ()
   "Return a list of all buffers with remote `default-directory'."
   (delq
index 54e7999e7a37cfc28c1fb3b7881e6ae83f7af881..7344c3c730a9dc6003919867fe3440e5985029ba 100644 (file)
     (delete-file (tramp-fuse-local-file-name filename) trash)
     (tramp-flush-file-properties v localname)))
 
+(defvar tramp-fuse-remove-hidden-files nil
+  "Remove hidden files from directory listings.")
+
 (defsubst tramp-fuse-remove-hidden-files (files)
   "Remove hidden files from FILES."
-  (cl-remove-if
-   (lambda (x) (and (stringp x) (string-match-p "\\.fuse_hidden" x)))
-   files))
+  (if tramp-fuse-remove-hidden-files
+      (cl-remove-if
+       (lambda (x) (and (stringp x) (string-match-p "\\.fuse_hidden" x)))
+       files)
+    files))
 
 (defun tramp-fuse-handle-directory-files
     (directory &optional full match nosort count)
index c09c016e6475a2f4c876d7bcfa845b133d4e9b60..3a5041c49180e96749c1c75315a426b75895f319 100644 (file)
@@ -1774,22 +1774,26 @@ a downcased host name only."
                  (list
                   t ;; handled.
                   nil ;; no abort of D-Bus.
-                  (with-tramp-connection-property (tramp-get-process v) message
-                    ;; In theory, there can be several choices.
-                    ;; Until now, there is only the question whether
-                    ;; to accept an unknown host signature or certificate.
-                    (with-temp-buffer
-                      ;; Preserve message for `progress-reporter'.
-                      (with-temp-message ""
-                        (insert message)
-                        (goto-char (point-max))
-                        (if noninteractive
-                            (message "%s" message)
-                          (pop-to-buffer (current-buffer)))
-                        (if (yes-or-no-p
-                             (buffer-substring
-                              (line-beginning-position) (point)))
-                            0 1)))))
+                  ;; Preserve message for `progress-reporter'.
+                  (with-temp-message ""
+                    (if noninteractive
+                        ;; Keep regression tests running.
+                        (progn
+                          (message "%s" message)
+                          0)
+                      (with-tramp-connection-property (tramp-get-process v) message
+                        ;; In theory, there can be several choices.
+                        ;; Until now, there is only the question
+                        ;; whether to accept an unknown host
+                        ;; signature or certificate.
+                        (with-temp-buffer
+                          (insert message)
+                          (goto-char (point-max))
+                          (pop-to-buffer (current-buffer))
+                          (if (yes-or-no-p
+                               (buffer-substring
+                                (line-beginning-position) (point)))
+                              0 1))))))
 
                ;; When QUIT is raised, we shall return this
                ;; information to D-Bus.