annotate lisp/net/tramp-cmds.el @ 110742:f0f8f95b6535

Remove directory-sep-char, obsolete since 21.1. * lisp/subr.el (directory-sep-char): Remove obsolete variable. * lisp/net/tramp-compat.el: Don't mess about with the byte-compiler unless it is "necessary". * doc/lispref/files.texi (File Name Components): Remove ignored section about deleted variable directory-sep-char. * etc/NEWS: Mention above change.
author Glenn Morris <rgm@gnu.org>
date Sun, 03 Oct 2010 14:23:13 -0700
parents 4e901a2d3669
children 49c1b16ca6b1
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
110015
280c8ae2476d Add "Package:" file headers to denote built-in packages.
Chong Yidong <cyd@stupidchicken.com>
parents: 109563
diff changeset
7 ;; Package: 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
8
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
9 ;; 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
10
94677
91e5880a36c1 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 91532
diff changeset
11 ;; 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
12 ;; 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
13 ;; 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
14 ;; (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
15
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
16 ;; 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
17 ;; 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
18 ;; 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
19 ;; 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
20
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
21 ;; 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
22 ;; 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
23
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
24 ;;; Commentary:
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
25
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
26 ;; 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
27 ;; 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
28
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
29 ;;; Code:
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
30
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
31 (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
32
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
33 (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
34 "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
35 (append
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
36 (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
37 "*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
38 (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
39 "*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
40
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
41 (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
42 "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
43 (delq
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
44 nil
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
45 (mapcar
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
46 (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
47 (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
48 (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
49 (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
50 x)))
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
51 (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
52
110379
ba4844f77a64 * net/tramp-cmds.el (tramp-cleanup-connection): Set tramp-autoload cookie.
Michael Albinus <michael.albinus@gmx.de>
parents: 110264
diff changeset
53 ;;;###tramp-autoload
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
54 (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
55 "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
56 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
57 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
58 (interactive
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
59 ;; 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
60 ;; 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
61 (list
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
62 (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
63 (mapcar
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
64 (lambda (x)
85943
85b6f7d4aca8 * net/tramp.el (top): Don't autoload `tramp-cache-print'.
Michael Albinus <michael.albinus@gmx.de>
parents: 85694
diff changeset
65 (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
66 (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
67 (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
68 (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
69 (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
70 (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
71 name)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
72
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
73 (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
74 (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
75 (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
76 "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
77 (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
78 (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
79 (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
80
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
81 (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
82 ;; 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
83 (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
84
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
85 ;; 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
86 (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
87
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
88 ;; 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
89 (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
90
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
91 ;; Flush connection cache.
91532
c4baafae1dc1 (tramp-cleanup-connection): Update calls to
Glenn Morris <rgm@gnu.org>
parents: 87665
diff changeset
92 (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
93 (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
94
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
95 ;; 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
96 (dolist
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
97 (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
98 (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
99 (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
100 (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
101
110702
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
102 ;;;###tramp-autoload
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
103 (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
104 "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
105 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
106 (interactive)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
107
95964
c8848a020b33 * net/tramp-cmds.el (tramp-cleanup-all-connections): Reset
Michael Albinus <michael.albinus@gmx.de>
parents: 94677
diff changeset
108 ;; Unlock Tramp.
c8848a020b33 * net/tramp-cmds.el (tramp-cleanup-all-connections): Reset
Michael Albinus <michael.albinus@gmx.de>
parents: 94677
diff changeset
109 (setq tramp-locked nil)
c8848a020b33 * net/tramp-cmds.el (tramp-cleanup-all-connections): Reset
Michael Albinus <michael.albinus@gmx.de>
parents: 94677
diff changeset
110
85508
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 password cache.
108377
7827d5a5c826 * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
Michael Albinus <albinus@detlef>
parents: 106815
diff changeset
112 (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
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 ;; 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
115 (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
116
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
117 ;; 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
118 (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
119 (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
120
110702
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
121 ;;;###tramp-autoload
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
122 (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
123 "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
124 (interactive)
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
125
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
126 ;; 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
127 (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
128
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
129 ;; 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
130 (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
131 (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
132
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
133 ;; 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
134
110264
ec526909f60b Migrate to Tramp 2.2. Rearrange load dependencies.
Michael Albinus <michael.albinus@gmx.de>
parents: 110015
diff changeset
135 ;;;###tramp-autoload
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
136 (defun tramp-version (arg)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
137 "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
138 (interactive "P")
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
139 (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
140
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
141 ;; 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
142 ;; 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
143
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
144 (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
145
110702
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
146 ;;;###tramp-autoload
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
147 (defun tramp-bug ()
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
148 "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
149 (interactive)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
150 (require 'reporter)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
151 (catch 'dont-send
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
152 (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
153 (reporter-submit-bug-report
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
154 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
155 (format "tramp (%s)" tramp-version) ; package name and version
110702
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
156 (sort
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
157 (delq nil (mapcar
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
158 (lambda (x)
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
159 (and x (boundp x) (cons x 'tramp-reporter-dump-variable)))
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
160 (append
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
161 (mapcar 'intern (all-completions "tramp-" obarray 'boundp))
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
162 ;; Non-tramp variables of interest.
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
163 '(shell-prompt-pattern
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
164 backup-by-copying
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
165 backup-by-copying-when-linked
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
166 backup-by-copying-when-mismatch
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
167 backup-by-copying-when-privileged-mismatch
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
168 backup-directory-alist
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
169 bkup-backup-directory-info
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
170 password-cache
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
171 password-cache-expiry
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
172 remote-file-name-inhibit-cache
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
173 file-name-handler-alist))))
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
174 (lambda (x y) (string< (symbol-name (car x)) (symbol-name (car y)))))
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
175
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
176 '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
177 '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
178 "\
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
179 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
180 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
181 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
182
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
183 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
184 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
185 kill bugs in Tramp.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
186
103528
014ba66def3d * net/tramp-cmds.el (tramp-bug): Recommend
Michael Albinus <michael.albinus@gmx.de>
parents: 102969
diff changeset
187 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
188
014ba66def3d * net/tramp-cmds.el (tramp-bug): Recommend
Michael Albinus <michael.albinus@gmx.de>
parents: 102969
diff changeset
189 M-x tramp-cleanup-all-connections
014ba66def3d * net/tramp-cmds.el (tramp-bug): Recommend
Michael Albinus <michael.albinus@gmx.de>
parents: 102969
diff changeset
190
014ba66def3d * net/tramp-cmds.el (tramp-bug): Recommend
Michael Albinus <michael.albinus@gmx.de>
parents: 102969
diff changeset
191 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
192 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
193
109563
35f14a2258f3 * net/tramp.el (tramp-methods): Move hostname to the end in all
Michael Albinus <michael.albinus@gmx.de>
parents: 108377
diff changeset
194 (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
195
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
196 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
197 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
198 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
199
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
200 --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
201 "))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
202
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
203 (defun tramp-reporter-dump-variable (varsym mailbuf)
110702
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
204 "Pretty-print the value of the variable in symbol VARSYM."
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
205 (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
206 (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
207 (symbol-value varsym))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
208
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
209 (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
210 ;; Pretty print the cache.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
211 (set varsym (read (format "(%s)" (tramp-cache-print val))))
110702
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
212 ;; There are non-7bit characters to be masked.
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
213 (when (and (boundp 'mm-7bit-chars)
110702
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
214 (stringp val)
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
215 (string-match
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
216 (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
217 (with-current-buffer reporter-eval-buffer
110702
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
218 (set varsym (format "(base64-decode-string \"%s\")"
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
219 (base64-encode-string val))))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
220
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
221 ;; Dump variable.
108377
7827d5a5c826 * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
Michael Albinus <albinus@detlef>
parents: 106815
diff changeset
222 (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
223
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
224 (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
225 ;; Remove string quotation.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
226 (forward-line -1)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
227 (when (looking-at
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
228 (concat "\\(^.*\\)" "\"" ;; \1 "
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
229 "\\((base64-decode-string \\)" "\\\\" ;; \2 \
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
230 "\\(\".*\\)" "\\\\" ;; \3 \
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
231 "\\(\")\\)" "\"$")) ;; \4 "
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
232 (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
233 (beginning-of-line)
110702
4e901a2d3669 * files.el (remote-file-name-inhibit-cache): New defcustom.
Michael Albinus <michael.albinus@gmx.de>
parents: 110379
diff changeset
234 (insert " ;; Variable encoded due to non-printable characters.\n"))
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
235 (forward-line 1))
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 ;; 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
238 (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
239 (set varsym val))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
240
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
241 (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
242 "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
243 ;; 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
244 (if (featurep 'xemacs)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
245 (progn
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
246 (load "message" 'noerror)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
247 (load "mml" 'noerror))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
248 (require 'message nil 'noerror)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
249 (require 'mml nil 'noerror))
108377
7827d5a5c826 * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
Michael Albinus <albinus@detlef>
parents: 106815
diff changeset
250 (tramp-compat-funcall 'message-mode)
7827d5a5c826 * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
Michael Albinus <albinus@detlef>
parents: 106815
diff changeset
251 (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
252
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
253 (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
254 "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
255 (goto-char (point-max))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
256
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
257 ;; Dump buffer local variables.
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
258 (dolist (buffer
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
259 (delq nil
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
260 (mapcar
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
261 '(lambda (b)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
262 (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
263 (buffer-list))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
264 (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
265 (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
266 (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
267 (with-current-buffer elbuf
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
268 (emacs-lisp-mode)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
269 (erase-buffer)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
270 (insert "\n(setq\n")
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
271 (lisp-indent-line)
108377
7827d5a5c826 * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
Michael Albinus <albinus@detlef>
parents: 106815
diff changeset
272 (tramp-compat-funcall
7827d5a5c826 * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
Michael Albinus <albinus@detlef>
parents: 106815
diff changeset
273 '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
274 (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
275 (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
276 varsym-or-cons-cell)))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
277 (when (string-match "tramp" (symbol-name varsym))
108377
7827d5a5c826 * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
Michael Albinus <albinus@detlef>
parents: 106815
diff changeset
278 (tramp-compat-funcall
7827d5a5c826 * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
Michael Albinus <albinus@detlef>
parents: 106815
diff changeset
279 '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
280 (lisp-indent-line)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
281 (insert ")\n"))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
282 (insert-buffer-substring elbuf)))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
283
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
284 ;; 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
285 (when (and
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
286 (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
287 (boundp 'mml-mode)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
288 (symbol-value 'mml-mode))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
289
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
290 (let ((tramp-buf-regexp "\\*\\(debug \\)?tramp/")
108377
7827d5a5c826 * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
Michael Albinus <albinus@detlef>
parents: 106815
diff changeset
291 (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
292 (curbuf (current-buffer)))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
293
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
294 ;; 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
295 (when buffer-list
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
296 (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
297 (delete-other-windows)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
298 (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
299 (goto-char (point-min))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
300 (while (not (eobp))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
301 (if (re-search-forward
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
302 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
303 (forward-line 1)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
304 (forward-line 0)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
305 (let ((start (point)))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
306 (forward-line 1)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
307 (kill-region start (point)))))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
308 (insert "
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
309 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
310 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
311 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
312 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
313 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
314
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
315 (when (>= tramp-verbose 6)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
316 (insert "\n\n")
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
317 (let ((start (point)))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
318 (insert "\
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
319 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
320 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
321 the debug buffer(s).")
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
322 (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
323
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
324 (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
325 (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
326 (goto-char (point-min))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
327
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
328 (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
329 ;; 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
330 (progn
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
331 (kill-buffer nil)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
332 (switch-to-buffer curbuf)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
333 (goto-char (point-max))
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
334 (insert "\n\
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
335 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
336 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
337 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
338 (dolist (buffer buffer-list)
108377
7827d5a5c826 * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
Michael Albinus <albinus@detlef>
parents: 106815
diff changeset
339 (tramp-compat-funcall
7827d5a5c826 * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
Michael Albinus <albinus@detlef>
parents: 106815
diff changeset
340 'mml-insert-empty-tag 'part 'type "text/plain"
7827d5a5c826 * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
Michael Albinus <albinus@detlef>
parents: 106815
diff changeset
341 'encoding "base64" 'disposition "attachment" 'buffer buffer
7827d5a5c826 * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
Michael Albinus <albinus@detlef>
parents: 106815
diff changeset
342 'description buffer))
85694
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
343 (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
344
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
345 ;; 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
346 (set-buffer curbuf)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
347 (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
348 (kill-buffer nil)
21983e7c844a * net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp.
Michael Albinus <michael.albinus@gmx.de>
parents: 85530
diff changeset
349 (throw 'dont-send nil))))))
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 (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
352
110264
ec526909f60b Migrate to Tramp 2.2. Rearrange load dependencies.
Michael Albinus <michael.albinus@gmx.de>
parents: 110015
diff changeset
353 (add-hook 'tramp-unload-hook
ec526909f60b Migrate to Tramp 2.2. Rearrange load dependencies.
Michael Albinus <michael.albinus@gmx.de>
parents: 110015
diff changeset
354 (lambda () (unload-feature 'tramp-cmds 'force)))
ec526909f60b Migrate to Tramp 2.2. Rearrange load dependencies.
Michael Albinus <michael.albinus@gmx.de>
parents: 110015
diff changeset
355
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
356 (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
357
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
358 ;;; TODO:
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
359
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
360 ;; * 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
361 ;; * 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
362 ;; 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
363 ;; input into the correct filename syntax (depending on the Emacs
110264
ec526909f60b Migrate to Tramp 2.2. Rearrange load dependencies.
Michael Albinus <michael.albinus@gmx.de>
parents: 110015
diff changeset
364 ;; flavor) (Reiner Steib)
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
365 ;; * 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
366 ;; 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
367 ;; * 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
368 ;; 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
369 ;; 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
370 ;; 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
371 ;; 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
372 ;; ordinary variable that gets its initial value from
110264
ec526909f60b Migrate to Tramp 2.2. Rearrange load dependencies.
Michael Albinus <michael.albinus@gmx.de>
parents: 110015
diff changeset
373 ;; tramp-default-user-alist and then is added to. (Pete Forman)
85508
05c8e6a18913 * net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff changeset
374
85530
1ee7c459e1db Add arch tagline
Miles Bader <miles@gnu.org>
parents: 85508
diff changeset
375 ;; 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
376 ;;; tramp-cmds.el ends here