annotate lisp/net/tramp-cmds.el @ 110923:9246a8f688c5

* lisp/mail/mail-utils.el (mail-mbox-from): Also try return-path. (Per 8-year old observation: http://lists.gnu.org/archive/html/bug-gnu-emacs/2002-06/msg00176.html )
author Glenn Morris <rgm@gnu.org>
date Fri, 08 Oct 2010 17:41:03 -0700
parents 5a6b4fafaa52
children 376148b31b5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
1 ;;; tramp-cmds.el --- Interactive commands for Tramp
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
2
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 103528
diff changeset
3 ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
4
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
5 ;; Author: Michael Albinus <michael.albinus@gmx.de>
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
6 ;; Keywords: comm, processes
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
7
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
9
94677
91e5880a36c1 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 91532
diff changeset
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
94677
91e5880a36c1 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 91532
diff changeset
12 ;; the Free Software Foundation, either version 3 of the License, or
91e5880a36c1 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 91532
diff changeset
13 ;; (at your option) any later version.
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
14
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
18 ;; GNU General Public License for more details.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
19
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
94677
91e5880a36c1 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 91532
diff changeset
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
22
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
23 ;;; Commentary:
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
24
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
25 ;; This package provides all interactive commands which are releated
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
26 ;; to Tramp.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
27
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
28 ;;; Code:
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
29
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
30 (require 'tramp)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
31
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
32 (defun tramp-list-tramp-buffers ()
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
33 "Return a list of all Tramp connection buffers."
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
34 (append
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
35 (all-completions
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
36 "*tramp" (mapcar 'list (mapcar 'buffer-name (buffer-list))))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
37 (all-completions
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
38 "*debug tramp" (mapcar 'list (mapcar 'buffer-name (buffer-list))))))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
39
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
40 (defun tramp-list-remote-buffers ()
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
41 "Return a list of all buffers with remote default-directory."
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
42 (delq
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
43 nil
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
44 (mapcar
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
45 (lambda (x)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
46 (with-current-buffer x
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
47 (when (and (stringp default-directory)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
48 (file-remote-p default-directory))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
49 x)))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
50 (buffer-list))))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
51
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
52 (defun tramp-cleanup-connection (vec)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
53 "Flush all connection related objects.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
54 This includes password cache, file cache, connection cache, buffers.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
55 When called interactively, a Tramp connection has to be selected."
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
56 (interactive
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
57 ;; When interactive, select the Tramp remote identification.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
58 ;; Return nil when there is no Tramp connection.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
59 (list
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
60 (let ((connections
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
61 (mapcar
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
62 (lambda (x)
85943
85b6f7d4aca8 * net/tramp.el (top): Don't autoload `tramp-cache-print'.
Michael Albinus <michael.albinus@gmx.de>
parents: 85694
diff changeset
63 (tramp-make-tramp-file-name
85b6f7d4aca8 * net/tramp.el (top): Don't autoload `tramp-cache-print'.
Michael Albinus <michael.albinus@gmx.de>
parents: 85694
diff changeset
64 (tramp-file-name-method x)
85b6f7d4aca8 * net/tramp.el (top): Don't autoload `tramp-cache-print'.
Michael Albinus <michael.albinus@gmx.de>
parents: 85694
diff changeset
65 (tramp-file-name-user x)
85b6f7d4aca8 * net/tramp.el (top): Don't autoload `tramp-cache-print'.
Michael Albinus <michael.albinus@gmx.de>
parents: 85694
diff changeset
66 (tramp-file-name-host x)
85b6f7d4aca8 * net/tramp.el (top): Don't autoload `tramp-cache-print'.
Michael Albinus <michael.albinus@gmx.de>
parents: 85694
diff changeset
67 (tramp-file-name-localname x)))
85962
7f134b676a0c * net/tramp.el (tramp-handle-substitute-in-file-name): Don't
Michael Albinus <michael.albinus@gmx.de>
parents: 85943
diff changeset
68 (tramp-list-connections)))
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
69 name)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
70
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
71 (when connections
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
72 (setq name
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
73 (completing-read
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
74 "Enter Tramp connection: " connections nil t
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
75 (try-completion "" connections)))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
76 (when (and name (file-remote-p name))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
77 (with-parsed-tramp-file-name name nil v))))))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
78
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
79 (if (not vec)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
80 ;; Nothing to do.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
81 (message "No Tramp connection found.")
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
82
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
83 ;; Flush password cache.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
84 (tramp-clear-passwd vec)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
85
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
86 ;; Flush file cache.
102969
a8c41d72ae8a * net/tramp-cmds.el (tramp-cleanup-connection): Flush cache data
Michael Albinus <michael.albinus@gmx.de>
parents: 100908
diff changeset
87 (tramp-flush-directory-property vec "")
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
88
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
89 ;; Flush connection cache.
91532
c4baafae1dc1 (tramp-cleanup-connection): Update calls to
Glenn Morris <rgm@gnu.org>
parents: 87665
diff changeset
90 (tramp-flush-connection-property (tramp-get-connection-process vec))
c4baafae1dc1 (tramp-cleanup-connection): Update calls to
Glenn Morris <rgm@gnu.org>
parents: 87665
diff changeset
91 (tramp-flush-connection-property vec)
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
92
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
93 ;; Remove buffers.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
94 (dolist
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
95 (buf (list (get-buffer (tramp-buffer-name vec))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
96 (get-buffer (tramp-debug-buffer-name vec))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
97 (tramp-get-connection-property vec "process-buffer" nil)))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
98 (when (bufferp buf) (kill-buffer buf)))))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
99
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
100 (defun tramp-cleanup-all-connections ()
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
101 "Flush all Tramp internal objects.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
102 This includes password cache, file cache, connection cache, buffers."
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
103 (interactive)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
104
95964
c8848a020b33 * net/tramp-cmds.el (tramp-cleanup-all-connections): Reset
Michael Albinus <michael.albinus@gmx.de>
parents: 94677
diff changeset
105 ;; Unlock Tramp.
c8848a020b33 * net/tramp-cmds.el (tramp-cleanup-all-connections): Reset
Michael Albinus <michael.albinus@gmx.de>
parents: 94677
diff changeset
106 (setq tramp-locked nil)
c8848a020b33 * net/tramp-cmds.el (tramp-cleanup-all-connections): Reset
Michael Albinus <michael.albinus@gmx.de>
parents: 94677
diff changeset
107
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
108 ;; Flush password cache.
110121
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
109 (tramp-compat-funcall 'password-reset)
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
110
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
111 ;; Flush file and connection cache.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
112 (clrhash tramp-cache-data)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
113
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
114 ;; Remove buffers.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
115 (dolist (name (tramp-list-tramp-buffers))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
116 (when (bufferp (get-buffer name)) (kill-buffer name))))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
117
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
118 (defun tramp-cleanup-all-buffers ()
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
119 "Kill all remote buffers."
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
120 (interactive)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
121
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
122 ;; Remove all Tramp related buffers.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
123 (tramp-cleanup-all-connections)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
124
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
125 ;; Remove all buffers with a remote default-directory.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
126 (dolist (name (tramp-list-remote-buffers))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
127 (when (bufferp (get-buffer name)) (kill-buffer name))))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
128
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
129 ;; Tramp version is useful in a number of situations.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
130
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
131 (defun tramp-version (arg)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
132 "Print version number of tramp.el in minibuffer or current buffer."
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
133 (interactive "P")
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
134 (if arg (insert tramp-version) (message tramp-version)))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
135
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
136 ;; Make the `reporter` functionality available for making bug reports about
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
137 ;; the package. A most useful piece of code.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
138
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
139 (autoload 'reporter-submit-bug-report "reporter")
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
140
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
141 (defun tramp-bug ()
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
142 "Submit a bug report to the Tramp developers."
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
143 (interactive)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
144 (require 'reporter)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
145 (catch 'dont-send
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
146 (let ((reporter-prompt-for-summary-p t))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
147 (reporter-submit-bug-report
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
148 tramp-bug-report-address ; to-address
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
149 (format "tramp (%s)" tramp-version) ; package name and version
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
150 (delq nil
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
151 `(;; Current state
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
152 tramp-current-method
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
153 tramp-current-user
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
154 tramp-current-host
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
155
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
156 ;; System defaults
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
157 tramp-auto-save-directory ; vars to dump
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
158 tramp-default-method
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
159 tramp-default-method-alist
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
160 tramp-default-host
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
161 tramp-default-proxies-alist
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
162 tramp-default-user
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
163 tramp-default-user-alist
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
164 tramp-rsh-end-of-line
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
165 tramp-default-password-end-of-line
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
166 tramp-login-prompt-regexp
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
167 ;; Mask non-7bit characters
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
168 (tramp-password-prompt-regexp . tramp-reporter-dump-variable)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
169 tramp-wrong-passwd-regexp
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
170 tramp-yesno-prompt-regexp
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
171 tramp-yn-prompt-regexp
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
172 tramp-terminal-prompt-regexp
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
173 tramp-temp-name-prefix
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
174 tramp-file-name-structure
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
175 tramp-file-name-regexp
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
176 tramp-methods
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
177 tramp-end-of-output
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
178 tramp-local-coding-commands
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
179 tramp-remote-coding-commands
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
180 tramp-actions-before-shell
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
181 tramp-actions-copy-out-of-band
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
182 tramp-terminal-type
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
183 ;; Mask non-7bit characters
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
184 (tramp-shell-prompt-pattern . tramp-reporter-dump-variable)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
185 ,(when (boundp 'tramp-backup-directory-alist)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
186 'tramp-backup-directory-alist)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
187 ,(when (boundp 'tramp-bkup-backup-directory-info)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
188 'tramp-bkup-backup-directory-info)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
189 ;; Dump cache.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
190 (tramp-cache-data . tramp-reporter-dump-variable)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
191
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
192 ;; Non-tramp variables of interest
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
193 ;; Mask non-7bit characters
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
194 (shell-prompt-pattern . tramp-reporter-dump-variable)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
195 backup-by-copying
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
196 backup-by-copying-when-linked
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
197 backup-by-copying-when-mismatch
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
198 ,(when (boundp 'backup-by-copying-when-privileged-mismatch)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
199 'backup-by-copying-when-privileged-mismatch)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
200 ,(when (boundp 'password-cache)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
201 'password-cache)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
202 ,(when (boundp 'password-cache-expiry)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
203 'password-cache-expiry)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
204 ,(when (boundp 'backup-directory-alist)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
205 'backup-directory-alist)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
206 ,(when (boundp 'bkup-backup-directory-info)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
207 'bkup-backup-directory-info)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
208 file-name-handler-alist))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
209
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
210 'tramp-load-report-modules ; pre-hook
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
211 'tramp-append-tramp-buffers ; post-hook
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
212 "\
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
213 Enter your bug report in this message, including as much detail
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
214 as you possibly can about the problem, what you did to cause it
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
215 and what the local and remote machines are.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
216
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
217 If you can give a simple set of instructions to make this bug
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
218 happen reliably, please include those. Thank you for helping
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
219 kill bugs in Tramp.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
220
103528
014ba66def3d * net/tramp-cmds.el (tramp-bug): Recommend
Michael Albinus <michael.albinus@gmx.de>
parents: 102969
diff changeset
221 Before reproducing the bug, you might apply
014ba66def3d * net/tramp-cmds.el (tramp-bug): Recommend
Michael Albinus <michael.albinus@gmx.de>
parents: 102969
diff changeset
222
014ba66def3d * net/tramp-cmds.el (tramp-bug): Recommend
Michael Albinus <michael.albinus@gmx.de>
parents: 102969
diff changeset
223 M-x tramp-cleanup-all-connections
014ba66def3d * net/tramp-cmds.el (tramp-bug): Recommend
Michael Albinus <michael.albinus@gmx.de>
parents: 102969
diff changeset
224
014ba66def3d * net/tramp-cmds.el (tramp-bug): Recommend
Michael Albinus <michael.albinus@gmx.de>
parents: 102969
diff changeset
225 This allows to investigate from a clean environment. Another
014ba66def3d * net/tramp-cmds.el (tramp-bug): Recommend
Michael Albinus <michael.albinus@gmx.de>
parents: 102969
diff changeset
226 useful thing to do is to put
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
227
110121
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
228 (setq tramp-verbose 9)
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
229
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
230 in the ~/.emacs file and to repeat the bug. Then, include the
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
231 contents of the *tramp/foo* buffer and the *debug tramp/foo*
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
232 buffer in your bug report.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
233
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
234 --bug report follows this line--
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
235 "))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
236
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
237 (defun tramp-reporter-dump-variable (varsym mailbuf)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
238 "Pretty-print the value of the variable in symbol VARSYM.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
239 Used for non-7bit chars in strings."
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
240 (let* ((reporter-eval-buffer (symbol-value 'reporter-eval-buffer))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
241 (val (with-current-buffer reporter-eval-buffer
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
242 (symbol-value varsym))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
243
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
244 (if (hash-table-p val)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
245 ;; Pretty print the cache.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
246 (set varsym (read (format "(%s)" (tramp-cache-print val))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
247 ;; There are characters to be masked.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
248 (when (and (boundp 'mm-7bit-chars)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
249 (string-match
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
250 (concat "[^" (symbol-value 'mm-7bit-chars) "]") val))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
251 (with-current-buffer reporter-eval-buffer
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
252 (set varsym (format "(base64-decode-string \"%s\""
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
253 (base64-encode-string val))))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
254
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
255 ;; Dump variable.
110121
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
256 (tramp-compat-funcall 'reporter-dump-variable varsym mailbuf)
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
257
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
258 (unless (hash-table-p val)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
259 ;; Remove string quotation.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
260 (forward-line -1)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
261 (when (looking-at
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
262 (concat "\\(^.*\\)" "\"" ;; \1 "
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
263 "\\((base64-decode-string \\)" "\\\\" ;; \2 \
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
264 "\\(\".*\\)" "\\\\" ;; \3 \
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
265 "\\(\")\\)" "\"$")) ;; \4 "
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
266 (replace-match "\\1\\2\\3\\4")
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
267 (beginning-of-line)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
268 (insert " ;; variable encoded due to non-printable characters\n"))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
269 (forward-line 1))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
270
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
271 ;; Reset VARSYM to old value.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
272 (with-current-buffer reporter-eval-buffer
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
273 (set varsym val))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
274
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
275 (defun tramp-load-report-modules ()
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
276 "Load needed modules for reporting."
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
277
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
278 ;; We load message.el and mml.el from Gnus.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
279 (if (featurep 'xemacs)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
280 (progn
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
281 (load "message" 'noerror)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
282 (load "mml" 'noerror))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
283 (require 'message nil 'noerror)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
284 (require 'mml nil 'noerror))
110121
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
285 (tramp-compat-funcall 'message-mode)
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
286 (tramp-compat-funcall 'mml-mode t))
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
287
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
288 (defun tramp-append-tramp-buffers ()
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
289 "Append Tramp buffers and buffer local variables into the bug report."
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
290
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
291 (goto-char (point-max))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
292
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
293 ;; Dump buffer local variables.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
294 (dolist (buffer
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
295 (delq nil
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
296 (mapcar
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
297 '(lambda (b)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
298 (when (string-match "\\*tramp/" (buffer-name b)) b))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
299 (buffer-list))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
300 (let ((reporter-eval-buffer buffer)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
301 (buffer-name (buffer-name buffer))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
302 (elbuf (get-buffer-create " *tmp-reporter-buffer*")))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
303 (with-current-buffer elbuf
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
304 (emacs-lisp-mode)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
305 (erase-buffer)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
306 (insert "\n(setq\n")
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
307 (lisp-indent-line)
110121
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
308 (tramp-compat-funcall
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
309 'reporter-dump-variable 'buffer-name (current-buffer))
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
310 (dolist (varsym-or-cons-cell (buffer-local-variables buffer))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
311 (let ((varsym (or (car-safe varsym-or-cons-cell)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
312 varsym-or-cons-cell)))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
313 (when (string-match "tramp" (symbol-name varsym))
110121
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
314 (tramp-compat-funcall
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
315 'reporter-dump-variable varsym (current-buffer)))))
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
316 (lisp-indent-line)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
317 (insert ")\n"))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
318 (insert-buffer-substring elbuf)))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
319
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
320 ;; Append buffers only when we are in message mode.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
321 (when (and
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
322 (eq major-mode 'message-mode)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
323 (boundp 'mml-mode)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
324 (symbol-value 'mml-mode))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
325
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
326 (let ((tramp-buf-regexp "\\*\\(debug \\)?tramp/")
110121
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
327 (buffer-list (tramp-compat-funcall 'tramp-list-tramp-buffers))
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
328 (curbuf (current-buffer)))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
329
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
330 ;; There is at least one Tramp buffer.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
331 (when buffer-list
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
332 (switch-to-buffer (list-buffers-noselect nil))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
333 (delete-other-windows)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
334 (setq buffer-read-only nil)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
335 (goto-char (point-min))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
336 (while (not (eobp))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
337 (if (re-search-forward
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
338 tramp-buf-regexp (tramp-compat-line-end-position) t)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
339 (forward-line 1)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
340 (forward-line 0)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
341 (let ((start (point)))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
342 (forward-line 1)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
343 (kill-region start (point)))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
344 (insert "
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
345 The buffer(s) above will be appended to this message. If you
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
346 don't want to append a buffer because it contains sensitive data,
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
347 or because the buffer is too large, you should delete the
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
348 respective buffer. The buffer(s) will contain user and host
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
349 names. Passwords will never be included there.")
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
350
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
351 (when (>= tramp-verbose 6)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
352 (insert "\n\n")
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
353 (let ((start (point)))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
354 (insert "\
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
355 Please note that you have set `tramp-verbose' to a value of at
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
356 least 6. Therefore, the contents of files might be included in
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
357 the debug buffer(s).")
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
358 (add-text-properties start (point) (list 'face 'italic))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
359
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
360 (set-buffer-modified-p nil)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
361 (setq buffer-read-only t)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
362 (goto-char (point-min))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
363
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
364 (if (y-or-n-p "Do you want to append the buffer(s)? ")
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
365 ;; OK, let's send. First we delete the buffer list.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
366 (progn
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
367 (kill-buffer nil)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
368 (switch-to-buffer curbuf)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
369 (goto-char (point-max))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
370 (insert "\n\
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
371 This is a special notion of the `gnus/message' package. If you
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
372 use another mail agent (by copying the contents of this buffer)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
373 please ensure that the buffers are attached to your email.\n\n")
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
374 (dolist (buffer buffer-list)
110121
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
375 (tramp-compat-funcall
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
376 'mml-insert-empty-tag 'part 'type "text/plain"
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
377 'encoding "base64" 'disposition "attachment" 'buffer buffer
5a6b4fafaa52 Sync with Tramp 2.1.19.
Michael Albinus <michael.albinus@gmx.de>
parents: 106815
diff changeset
378 'description buffer))
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
379 (set-buffer-modified-p nil))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
380
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
381 ;; Don't send. Delete the message buffer.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
382 (set-buffer curbuf)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
383 (set-buffer-modified-p nil)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
384 (kill-buffer nil)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
385 (throw 'dont-send nil))))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
386
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
387 (defalias 'tramp-submit-bug 'tramp-bug)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
388
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
389 (provide 'tramp-cmds)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
390
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
391 ;;; TODO:
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
392
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
393 ;; * Clean up unused *tramp/foo* buffers after a while. (Pete Forman)
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
394 ;; * WIBNI there was an interactive command prompting for Tramp
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
395 ;; method, hostname, username and filename and translates the user
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
396 ;; input into the correct filename syntax (depending on the Emacs
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
397 ;; flavor) (Reiner Steib)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
398 ;; * Let the user edit the connection properties interactively.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
399 ;; Something like `gnus-server-edit-server' in Gnus' *Server* buffer.
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
400 ;; * It's just that when I come to Customize `tramp-default-user-alist'
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
401 ;; I'm presented with a mismatch and raw lisp for a value. It is my
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
402 ;; understanding that a variable declared with defcustom is a User
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
403 ;; Option and should not be modified by the code. add-to-list is
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
404 ;; called in several places. One way to handle that is to have a new
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
405 ;; ordinary variable that gets its initial value from
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
406 ;; tramp-default-user-alist and then is added to. (Pete Forman)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
407
85530
1ee7c459e1db Add arch tagline
Miles Bader <miles@gnu.org>
parents: 85508
diff changeset
408 ;; arch-tag: 190d4c33-76bb-4e99-8b6f-71741f23d98c
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
409 ;;; tramp-cmds.el ends here