From: Michael Albinus Date: Sun, 3 Oct 2021 12:27:26 +0000 (+0200) Subject: Suppress superfluous error messages in Tramp X-Git-Tag: emacs-28.0.90~449 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3dae1e33d1;p=emacs.git Suppress superfluous error messages in Tramp * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-insert-file-contents): * lisp/net/tramp.el (tramp-handle-insert-file-contents) (tramp-handle-lock-file): Suppress superfluous error message. --- diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el index 0019ac014f8..688e408bfb0 100644 --- a/lisp/net/tramp-sshfs.el +++ b/lisp/net/tramp-sshfs.el @@ -222,9 +222,10 @@ arguments to pass to the OPERATION." (defun tramp-sshfs-handle-insert-file-contents (filename &optional visit beg end replace) "Like `insert-file-contents' for Tramp files." - (let ((result - (insert-file-contents - (tramp-fuse-local-file-name filename) visit beg end replace))) + (let* (signal-hook-function + (result + (insert-file-contents + (tramp-fuse-local-file-name filename) visit beg end replace))) (when visit (setq buffer-file-name filename)) (cons (expand-file-name filename) (cdr result)))) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 62628363b77..b69e143ff14 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3743,7 +3743,8 @@ User is always nil." (with-parsed-tramp-file-name filename nil (unwind-protect (if (not (file-exists-p filename)) - (tramp-compat-file-missing v filename) + (let ((tramp-verbose (if visit 0 tramp-verbose))) + (tramp-compat-file-missing v filename)) (with-tramp-progress-reporter v 3 (format-message "Inserting `%s'" filename) @@ -3920,7 +3921,8 @@ Return nil when there is no lockfile." (tramp-error v 'file-error "Unsafe lock file name"))) ;; Do the lock. - (let (create-lockfiles signal-hook-function) + (let ((tramp-verbose 0) + create-lockfiles signal-hook-function) (condition-case nil (make-symbolic-link info lockname 'ok-if-already-exists) (error