1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 02:31:03 -08:00

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.
This commit is contained in:
Michael Albinus 2020-09-05 19:29:12 +02:00
parent 82b695faa3
commit a04e76ac7d
2 changed files with 11 additions and 10 deletions

View file

@ -482,9 +482,7 @@ For details, see `tramp-rename-files'."
(defun tramp-bug ()
"Submit a bug report to the Tramp developers."
(interactive)
(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))
(reporter-submit-bug-report
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'."
(sort
(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)))
(append
(mapcar #'intern (all-completions "tramp-" obarray #'boundp))
;; Non-tramp variables of interest.
;; Non-Tramp variables of interest.
'(shell-prompt-pattern
backup-by-copying
backup-by-copying-when-linked
@ -552,11 +551,11 @@ buffer in your bug report.
(string-match-p
(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)