Mercurial > emacs
annotate lisp/net/tramp-cmds.el @ 85508:05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Require tramp-cmds.el.
(tramp-make-tramp-temp-file): We can get rid of DONT-CREATE.
(tramp-handle-file-name-all-completions): Expand DIRECTORY.
(tramp-do-copy-or-rename-file-directly): Make more rigid checks.
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Use `make-temp-name'. This is
possible, because we don't need to create the temporary file, but
we need a prefix for ssh, which has its own temporary file
handling.
(tramp-handle-delete-directory): Add "-f" to rmdir.
(tramp-handle-dired-recursive-delete-directory): Call "rm -rf".
(tramp-handle-insert-file-contents): Don't raise a tramp-error but
a signal, in order to give the callee a chance to suppress.
(tramp-handle-write-region): Set owner also in case of short
track. Don't use compatibility calls for `write-region' anymore.
(tramp-clear-passwd): Add parameter VEC. Adapt all callees.
(tramp-append-tramp-buffers): Apply `tramp-list-tramp-buffers'.
* net/tramp-cmds.el: New file.
* net/tramp-gw.el (tramp-gw-basic-authentication): Apply VEC to
`tramp-clear-passwd'.
* net/trampver.el: Update release number.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Sun, 21 Oct 2007 14:02:38 +0000 |
parents | |
children | 1ee7c459e1db |
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 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
3 ;; Copyright (C) 2007 Free Software Foundation, Inc. |
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 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
10 ;; GNU Emacs is free software; you can redistribute it and/or modify |
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 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
12 ;; the Free Software Foundation; either version 3, or (at your option) |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
13 ;; any later version. |
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 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
21 ;; along with GNU Emacs; see the file COPYING. If not, see |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
22 ;; <http://www.gnu.org/licenses/>. |
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 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
53 (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
|
54 "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
|
55 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
|
56 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
|
57 (interactive |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
58 ;; 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
|
59 ;; 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
|
60 (list |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
61 (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
|
62 (mapcar |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
63 (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
|
64 (with-current-buffer x (list (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
|
65 ;; We shall not count debug buffers, because their |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
66 ;; default-directory is random. It could be even a remote |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
67 ;; one from another connection. |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
68 (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
|
69 "*tramp" (mapcar 'list (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
|
70 name) |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
71 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
72 (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
|
73 (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
|
74 (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
|
75 "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
|
76 (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
|
77 (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
|
78 (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
|
79 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
80 (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
|
81 ;; 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
|
82 (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
|
83 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
84 ;; 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
|
85 (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
|
86 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
87 ;; Flush file cache. |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
88 (tramp-flush-directory-property vec "/") |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
89 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
90 ;; Flush 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
|
91 (tramp-flush-connection-property (tramp-get-connection-process vec) nil) |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
92 (tramp-flush-connection-property vec nil) |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
93 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
94 ;; 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
|
95 (dolist |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
96 (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
|
97 (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
|
98 (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
|
99 (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
|
100 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
101 (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
|
102 "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
|
103 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
|
104 (interactive) |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
105 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
106 ;; 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
|
107 (when (functionp 'password-reset) |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
108 (funcall (symbol-function 'password-reset))) |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
109 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
110 ;; 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
|
111 (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
|
112 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
113 ;; 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
|
114 (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
|
115 (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
|
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 (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
|
118 "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
|
119 (interactive) |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
120 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
121 ;; 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
|
122 (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
|
123 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
124 ;; 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
|
125 (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
|
126 (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
|
127 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
128 (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
|
129 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
130 ;;; TODO: |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
131 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
132 ;; * Clean up unused *tramp/foo* buffers after a while. (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
|
133 ;; * WIBNI there was an interactive command prompting 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
|
134 ;; 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
|
135 ;; 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
|
136 ;; 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
|
137 ;; * 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
|
138 ;; 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
|
139 ;; * 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
|
140 ;; 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
|
141 ;; 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
|
142 ;; 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
|
143 ;; 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
|
144 ;; 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
|
145 ;; 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
|
146 |
05c8e6a18913
* net/tramp.el (top): Put load of all tramp-* files into a dolist.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
147 ;;; tramp-cmds.el ends here |