[Top][All Lists]

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

master a04e76a 1/2: Minor improvements in Tramp error reporting

From: Michael Albinus
Subject: master a04e76a 1/2: Minor improvements in Tramp error reporting
Date: Sat, 5 Sep 2020 13:29:56 -0400 (EDT)

branch: master
commit a04e76ac7d553b48bd35c1331b3e6720de3ec4cc
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Minor improvements in Tramp error reporting
    * lisp/net/tramp-cmds.el (tramp-bug):
    Handle `tramp-suppress-trace' property.
    (tramp-reporter-dump-variable): Improve variable dump.
    * lisp/net/tramp.el (tramp--startup-hook, tramp-password-save-function):
    Add `tramp-suppress-trace' property.
 lisp/net/tramp-cmds.el | 19 +++++++++----------
 lisp/net/tramp.el      |  2 ++
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index 52cc186..827d5f6 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -482,9 +482,7 @@ For details, see `tramp-rename-files'."
 (defun tramp-bug ()
   "Submit a bug report to the Tramp developers."
-  (let ((reporter-prompt-for-summary-p t)
-       ;; In rare cases, it could contain the password.  So we make it nil.
-       tramp-password-save-function)
+  (let ((reporter-prompt-for-summary-p t))
      tramp-bug-report-address    ; to-address
      (format "tramp (%s %s/%s)" ; package name and version
@@ -492,10 +490,11 @@ For details, see `tramp-rename-files'."
       (delq nil (mapcar
        (lambda (x)
-         (and x (boundp x) (cons x 'tramp-reporter-dump-variable)))
+         (and x (boundp x) (not (get x 'tramp-suppress-trace))
+              (cons x 'tramp-reporter-dump-variable)))
         (mapcar #'intern (all-completions "tramp-" obarray #'boundp))
-        ;; Non-tramp variables of interest.
+        ;; Non-Tramp variables of interest.
@@ -552,11 +551,11 @@ buffer in your bug report.
                  (concat "[^" (bound-and-true-p mm-7bit-chars) "]") val))
        (with-current-buffer reporter-eval-buffer
-         (set
-          varsym
-          (format
-           "(decode-coding-string (base64-decode-string \"%s\") 'raw-text)"
-           (base64-encode-string (encode-coding-string val 'raw-text)))))))
+         (set varsym
+              `(decode-coding-string
+                (base64-decode-string
+                 ,(base64-encode-string (encode-coding-string val 'raw-text)))
+                'raw-text)))))
     ;; Dump variable.
     (reporter-dump-variable varsym mailbuf)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 28067fa..9644639 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -80,6 +80,7 @@
 (eval-and-compile ;; So it's also available in tramp-loaddefs.el!
   (defvar tramp--startup-hook nil
     "Forms to be executed at the end of tramp.el.")
+  (put 'tramp--startup-hook 'tramp-suppress-trace t)
   (defmacro tramp--with-startup (&rest body)
     "Schedule BODY to be executed at the end of tramp.el."
@@ -1241,6 +1242,7 @@ the (optional) timestamp of last activity on this 
   "Password save function.
 Will be called once the password has been verified by successful
+(put 'tramp-password-save-function 'tramp-suppress-trace t)
 (defconst tramp-completion-file-name-handler-alist

reply via email to

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