1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 02:20:21 -08:00

Some minor Tramp fixes

* 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.
This commit is contained in:
Michael Albinus 2022-05-17 09:13:34 +02:00
parent f928330fa8
commit f836ed098f
3 changed files with 30 additions and 19 deletions

View file

@ -51,6 +51,7 @@ SYNTAX can be one of the symbols `default' (default),
(when syntax (when syntax
(customize-set-variable 'tramp-syntax syntax))) (customize-set-variable 'tramp-syntax syntax)))
;;;###tramp-autoload
(defun tramp-list-tramp-buffers () (defun tramp-list-tramp-buffers ()
"Return a list of all Tramp connection buffers." "Return a list of all Tramp connection buffers."
(append (append
@ -61,6 +62,7 @@ SYNTAX can be one of the symbols `default' (default),
(all-completions (all-completions
"*trace tramp" (mapcar #'list (mapcar #'buffer-name (buffer-list)))))) "*trace tramp" (mapcar #'list (mapcar #'buffer-name (buffer-list))))))
;;;###tramp-autoload
(defun tramp-list-remote-buffers () (defun tramp-list-remote-buffers ()
"Return a list of all buffers with remote `default-directory'." "Return a list of all buffers with remote `default-directory'."
(delq (delq

View file

@ -44,11 +44,16 @@
(delete-file (tramp-fuse-local-file-name filename) trash) (delete-file (tramp-fuse-local-file-name filename) trash)
(tramp-flush-file-properties v localname))) (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) (defsubst tramp-fuse-remove-hidden-files (files)
"Remove hidden files from FILES." "Remove hidden files from FILES."
(cl-remove-if (if tramp-fuse-remove-hidden-files
(lambda (x) (and (stringp x) (string-match-p "\\.fuse_hidden" x))) (cl-remove-if
files)) (lambda (x) (and (stringp x) (string-match-p "\\.fuse_hidden" x)))
files)
files))
(defun tramp-fuse-handle-directory-files (defun tramp-fuse-handle-directory-files
(directory &optional full match nosort count) (directory &optional full match nosort count)

View file

@ -1774,22 +1774,26 @@ a downcased host name only."
(list (list
t ;; handled. t ;; handled.
nil ;; no abort of D-Bus. nil ;; no abort of D-Bus.
(with-tramp-connection-property (tramp-get-process v) message ;; Preserve message for `progress-reporter'.
;; In theory, there can be several choices. (with-temp-message ""
;; Until now, there is only the question whether (if noninteractive
;; to accept an unknown host signature or certificate. ;; Keep regression tests running.
(with-temp-buffer (progn
;; Preserve message for `progress-reporter'. (message "%s" message)
(with-temp-message "" 0)
(insert message) (with-tramp-connection-property (tramp-get-process v) message
(goto-char (point-max)) ;; In theory, there can be several choices.
(if noninteractive ;; Until now, there is only the question
(message "%s" message) ;; whether to accept an unknown host
(pop-to-buffer (current-buffer))) ;; signature or certificate.
(if (yes-or-no-p (with-temp-buffer
(buffer-substring (insert message)
(line-beginning-position) (point))) (goto-char (point-max))
0 1))))) (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 ;; When QUIT is raised, we shall return this
;; information to D-Bus. ;; information to D-Bus.