diff options
| author | Michael Albinus | 2019-07-15 12:49:42 +0200 |
|---|---|---|
| committer | Michael Albinus | 2019-07-15 12:49:42 +0200 |
| commit | f23a3dd4a90e22ec2acb044b496639d6217c5d24 (patch) | |
| tree | a9909102f1574153778f01d722ec768b4fc15c63 | |
| parent | 4529057c97322893fb415512a2a51bc4616754f7 (diff) | |
| download | emacs-f23a3dd4a90e22ec2acb044b496639d6217c5d24.tar.gz emacs-f23a3dd4a90e22ec2acb044b496639d6217c5d24.zip | |
* lisp/net/tramp-cmds.el (tramp-bug, tramp-append-tramp-buffers):
Don't cancel if debug buffers aren't appended.
| -rw-r--r-- | lisp/net/tramp-cmds.el | 98 |
1 files changed, 45 insertions, 53 deletions
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 007b98f94fe..35bb85b82d9 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el | |||
| @@ -212,39 +212,38 @@ This includes password cache, file cache, connection cache, buffers." | |||
| 212 | (defun tramp-bug () | 212 | (defun tramp-bug () |
| 213 | "Submit a bug report to the Tramp developers." | 213 | "Submit a bug report to the Tramp developers." |
| 214 | (interactive) | 214 | (interactive) |
| 215 | (catch 'dont-send | 215 | (let ((reporter-prompt-for-summary-p t) |
| 216 | (let ((reporter-prompt-for-summary-p t) | 216 | ;; In rare cases, it could contain the password. So we make it nil. |
| 217 | ;; In rare cases, it could contain the password. So we make it nil. | 217 | tramp-password-save-function) |
| 218 | tramp-password-save-function) | 218 | (reporter-submit-bug-report |
| 219 | (reporter-submit-bug-report | 219 | tramp-bug-report-address ; to-address |
| 220 | tramp-bug-report-address ; to-address | 220 | (format "tramp (%s %s/%s)" ; package name and version |
| 221 | (format "tramp (%s %s/%s)" ; package name and version | 221 | tramp-version tramp-repository-branch tramp-repository-version) |
| 222 | tramp-version tramp-repository-branch tramp-repository-version) | 222 | (sort |
| 223 | (sort | 223 | (delq nil (mapcar |
| 224 | (delq nil (mapcar | 224 | (lambda (x) |
| 225 | (lambda (x) | 225 | (and x (boundp x) (cons x 'tramp-reporter-dump-variable))) |
| 226 | (and x (boundp x) (cons x 'tramp-reporter-dump-variable))) | 226 | (append |
| 227 | (append | 227 | (mapcar #'intern (all-completions "tramp-" obarray #'boundp)) |
| 228 | (mapcar #'intern (all-completions "tramp-" obarray #'boundp)) | 228 | ;; Non-tramp variables of interest. |
| 229 | ;; Non-tramp variables of interest. | 229 | '(shell-prompt-pattern |
| 230 | '(shell-prompt-pattern | 230 | backup-by-copying |
| 231 | backup-by-copying | 231 | backup-by-copying-when-linked |
| 232 | backup-by-copying-when-linked | 232 | backup-by-copying-when-mismatch |
| 233 | backup-by-copying-when-mismatch | 233 | backup-by-copying-when-privileged-mismatch |
| 234 | backup-by-copying-when-privileged-mismatch | 234 | backup-directory-alist |
| 235 | backup-directory-alist | 235 | password-cache |
| 236 | password-cache | 236 | password-cache-expiry |
| 237 | password-cache-expiry | 237 | remote-file-name-inhibit-cache |
| 238 | remote-file-name-inhibit-cache | 238 | connection-local-profile-alist |
| 239 | connection-local-profile-alist | 239 | connection-local-criteria-alist |
| 240 | connection-local-criteria-alist | 240 | file-name-handler-alist)))) |
| 241 | file-name-handler-alist)))) | 241 | (lambda (x y) (string< (symbol-name (car x)) (symbol-name (car y))))) |
| 242 | (lambda (x y) (string< (symbol-name (car x)) (symbol-name (car y))))) | 242 | |
| 243 | 243 | 'tramp-load-report-modules ; pre-hook | |
| 244 | 'tramp-load-report-modules ; pre-hook | 244 | 'tramp-append-tramp-buffers ; post-hook |
| 245 | 'tramp-append-tramp-buffers ; post-hook | 245 | (propertize |
| 246 | (propertize | 246 | "\n" 'display "\ |
| 247 | "\n" 'display "\ | ||
| 248 | Enter your bug report in this message, including as much detail | 247 | Enter your bug report in this message, including as much detail |
| 249 | as you possibly can about the problem, what you did to cause it | 248 | as you possibly can about the problem, what you did to cause it |
| 250 | and what the local and remote machines are. | 249 | and what the local and remote machines are. |
| @@ -267,7 +266,7 @@ contents of the *tramp/foo* buffer and the *debug tramp/foo* | |||
| 267 | buffer in your bug report. | 266 | buffer in your bug report. |
| 268 | 267 | ||
| 269 | --bug report follows this line-- | 268 | --bug report follows this line-- |
| 270 | "))))) | 269 | ")))) |
| 271 | 270 | ||
| 272 | (defun tramp-reporter-dump-variable (varsym mailbuf) | 271 | (defun tramp-reporter-dump-variable (varsym mailbuf) |
| 273 | "Pretty-print the value of the variable in symbol VARSYM." | 272 | "Pretty-print the value of the variable in symbol VARSYM." |
| @@ -398,28 +397,21 @@ the debug buffer(s).") | |||
| 398 | (setq buffer-read-only t) | 397 | (setq buffer-read-only t) |
| 399 | (goto-char (point-min)) | 398 | (goto-char (point-min)) |
| 400 | 399 | ||
| 401 | (if (y-or-n-p "Do you want to append the buffer(s)? ") | 400 | (when (y-or-n-p "Do you want to append the buffer(s)? ") |
| 402 | ;; OK, let's send. First we delete the buffer list. | 401 | ;; OK, let's send. First we delete the buffer list. |
| 403 | (progn | 402 | (kill-buffer nil) |
| 404 | (kill-buffer nil) | 403 | (switch-to-buffer curbuf) |
| 405 | (switch-to-buffer curbuf) | 404 | (goto-char (point-max)) |
| 406 | (goto-char (point-max)) | 405 | (insert (propertize "\n" 'display "\n\ |
| 407 | (insert (propertize "\n" 'display "\n\ | ||
| 408 | This is a special notion of the `gnus/message' package. If you | 406 | This is a special notion of the `gnus/message' package. If you |
| 409 | use another mail agent (by copying the contents of this buffer) | 407 | use another mail agent (by copying the contents of this buffer) |
| 410 | please ensure that the buffers are attached to your email.\n\n")) | 408 | please ensure that the buffers are attached to your email.\n\n")) |
| 411 | (dolist (buffer buffer-list) | 409 | (dolist (buffer buffer-list) |
| 412 | (mml-insert-empty-tag | 410 | (mml-insert-empty-tag |
| 413 | 'part 'type "text/plain" | 411 | 'part 'type "text/plain" |
| 414 | 'encoding "base64" 'disposition "attachment" 'buffer buffer | 412 | 'encoding "base64" 'disposition "attachment" 'buffer buffer |
| 415 | 'description buffer)) | 413 | 'description buffer)) |
| 416 | (set-buffer-modified-p nil)) | 414 | (set-buffer-modified-p nil)))))) |
| 417 | |||
| 418 | ;; Don't send. Delete the message buffer. | ||
| 419 | (set-buffer curbuf) | ||
| 420 | (set-buffer-modified-p nil) | ||
| 421 | (kill-buffer nil) | ||
| 422 | (throw 'dont-send nil)))))) | ||
| 423 | 415 | ||
| 424 | (defalias 'tramp-submit-bug #'tramp-bug) | 416 | (defalias 'tramp-submit-bug #'tramp-bug) |
| 425 | 417 | ||