]> git.eshelyaron.com Git - emacs.git/commitdiff
Suppress superfluous error messages in Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 3 Oct 2021 12:27:26 +0000 (14:27 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 3 Oct 2021 12:27:26 +0000 (14:27 +0200)
* 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.

lisp/net/tramp-sshfs.el
lisp/net/tramp.el

index 0019ac014f88b456dccd2ddfac900c10b4b1faa5..688e408bfb0c44ee28ef6de4dbc2925a2c2c8157 100644 (file)
@@ -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))))
 
index 62628363b77163cccbf45fd83ae85dd9bbb0bfde..b69e143ff1453f0eb5a7660c43d6063eba383cb4 100644 (file)
@@ -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