emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 3dae1e3: Suppress superfluous error messages in Tramp


From: Michael Albinus
Subject: emacs-28 3dae1e3: Suppress superfluous error messages in Tramp
Date: Sun, 3 Oct 2021 08:27:35 -0400 (EDT)

branch: emacs-28
commit 3dae1e33d19e2a7e0f879a38354944c9d567c9d3
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    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.
---
 lisp/net/tramp-sshfs.el | 7 ++++---
 lisp/net/tramp.el       | 6 ++++--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el
index 0019ac0..688e408 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 6262836..b69e143 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]