mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 10:27:41 +00:00
Improve Tramp debugging
* lisp/net/tramp-cache.el (tramp-list-connections): Fix docstring. * lisp/net/tramp.el (tramp-backtrace): New optional arg FORCE.
This commit is contained in:
parent
112b6b8e37
commit
8fca44da81
2 changed files with 11 additions and 9 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue