[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8fca44da81: Improve Tramp debugging
From: |
Michael Albinus |
Subject: |
master 8fca44da81: Improve Tramp debugging |
Date: |
Wed, 15 Jun 2022 04:58:07 -0400 (EDT) |
branch: master
commit 8fca44da816af3d8f3dde2cea871c7563961ef69
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Improve Tramp debugging
* lisp/net/tramp-cache.el (tramp-list-connections): Fix docstring.
* lisp/net/tramp.el (tramp-backtrace): New optional arg FORCE.
---
lisp/net/tramp-cache.el | 2 +-
lisp/net/tramp.el | 18 ++++++++++--------
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index dc1e3d28b5..a0cbfed64e 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -427,7 +427,7 @@ used to cache connection properties of the local machine."
;;;###tramp-autoload
(defun tramp-list-connections ()
- "Return all known `tramp-file-name' structs according to `tramp-cache'."
+ "Return all active `tramp-file-name' structs according to
`tramp-cache-data'."
(let ((tramp-verbose 0))
(delq nil (mapcar
(lambda (key)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index cee8897b4f..e4b14cfbc2 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2148,15 +2148,17 @@ applicable)."
(put #'tramp-message 'tramp-suppress-trace t)
-(defsubst tramp-backtrace (&optional vec-or-proc)
+(defsubst tramp-backtrace (&optional vec-or-proc force)
"Dump a backtrace into the debug buffer.
-If VEC-OR-PROC is nil, the buffer *debug tramp* is used. This
-function is meant for debugging purposes."
- (when (>= tramp-verbose 10)
- (if vec-or-proc
- (tramp-message
- vec-or-proc 10 "\n%s" (with-output-to-string (backtrace)))
- (with-output-to-temp-buffer "*debug tramp*" (backtrace)))))
+If VEC-OR-PROC is nil, the buffer *debug tramp* is used. FORCE
+forces the backtrace even if `tramp-verbose' is less than 10.
+This function is meant for debugging purposes."
+ (let ((tramp-verbose (if force 10 tramp-verbose)))
+ (when (>= tramp-verbose 10)
+ (if vec-or-proc
+ (tramp-message
+ vec-or-proc 10 "\n%s" (with-output-to-string (backtrace)))
+ (with-output-to-temp-buffer "*debug tramp*" (backtrace))))))
(put #'tramp-backtrace 'tramp-suppress-trace t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 8fca44da81: Improve Tramp debugging,
Michael Albinus <=