diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2010-10-02 15:21:43 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2010-10-02 15:21:43 +0200 |
commit | 4bc3c53d1d9d5b0533c2bbe06693660c8abf1f4a (patch) | |
tree | fe8c7483b447abfa52e415279c0f78e977edf7f5 /lisp/net/tramp-cmds.el | |
parent | 573a83b80263cf151982e069fe98a941c893e249 (diff) | |
download | emacs-4bc3c53d1d9d5b0533c2bbe06693660c8abf1f4a.tar.gz |
* files.el (remote-file-name-inhibit-cache): New defcustom.
* time.el (display-time-file-nonempty-p): Use
`remote-file-name-inhibit-cache'.
* net/tramp.el (tramp-completion-reread-directory-timeout): Fix
docstring.
* net/tramp-cache.el (tramp-cache-inhibit-cache): Remove.
(tramp-get-file-property): Replace `tramp-cache-inhibit-cache' by
`remote-file-name-inhibit-cache'. Check also for an integer
value. Add/increase counter when `tramp-verbose' >= 10.
(tramp-set-file-property): Add/increase counter when
`tramp-verbose' >= 10.
* net/tramp-cmds.el (tramp-cleanup-all-connections)
(tramp-cleanup-all-buffers): Set tramp-autoload cookie.
(tramp-bug): Set tramp-autoload cookie. Report all interned
tramp-* variables. Report also `remote-file-name-inhibit-cache'.
(tramp-reporter-dump-variable): Fix docstring. Mask non-7bit
characters only in strings.
* net/tramp-compat.el (remote-file-name-inhibit-cache): Define due
to backward compatibility.
* net/tramp-sh.el (tramp-handle-verify-visited-file-modtime)
(tramp-handle-file-name-all-completions)
(tramp-handle-vc-registered): Use
`remote-file-name-inhibit-cache'.
(tramp-open-connection-setup-interactive-shell): Call
`tramp-cleanup-connection' directly.
Diffstat (limited to 'lisp/net/tramp-cmds.el')
-rw-r--r-- | lisp/net/tramp-cmds.el | 93 |
1 files changed, 27 insertions, 66 deletions
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 5937a737b96..e6e1bc671e7 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -99,6 +99,7 @@ When called interactively, a Tramp connection has to be selected." (tramp-get-connection-property vec "process-buffer" nil))) (when (bufferp buf) (kill-buffer buf))))) +;;;###tramp-autoload (defun tramp-cleanup-all-connections () "Flush all Tramp internal objects. This includes password cache, file cache, connection cache, buffers." @@ -117,6 +118,7 @@ This includes password cache, file cache, connection cache, buffers." (dolist (name (tramp-list-tramp-buffers)) (when (bufferp (get-buffer name)) (kill-buffer name)))) +;;;###tramp-autoload (defun tramp-cleanup-all-buffers () "Kill all remote buffers." (interactive) @@ -141,6 +143,7 @@ This includes password cache, file cache, connection cache, buffers." (autoload 'reporter-submit-bug-report "reporter") +;;;###tramp-autoload (defun tramp-bug () "Submit a bug report to the Tramp developers." (interactive) @@ -150,65 +153,25 @@ This includes password cache, file cache, connection cache, buffers." (reporter-submit-bug-report tramp-bug-report-address ; to-address (format "tramp (%s)" tramp-version) ; package name and version - (delq nil - `(;; Current state - tramp-current-method - tramp-current-user - tramp-current-host - - ;; System defaults - tramp-auto-save-directory ; vars to dump - tramp-default-method - tramp-default-method-alist - tramp-default-host - tramp-default-proxies-alist - tramp-default-user - tramp-default-user-alist - tramp-rsh-end-of-line - tramp-default-password-end-of-line - tramp-login-prompt-regexp - ;; Mask non-7bit characters - (tramp-password-prompt-regexp . tramp-reporter-dump-variable) - tramp-wrong-passwd-regexp - tramp-yesno-prompt-regexp - tramp-yn-prompt-regexp - tramp-terminal-prompt-regexp - tramp-temp-name-prefix - tramp-file-name-structure - tramp-file-name-regexp - tramp-methods - tramp-end-of-output - tramp-local-coding-commands - tramp-remote-coding-commands - tramp-actions-before-shell - tramp-actions-copy-out-of-band - tramp-terminal-type - ;; Mask non-7bit characters - (tramp-shell-prompt-pattern . tramp-reporter-dump-variable) - ,(when (boundp 'tramp-backup-directory-alist) - 'tramp-backup-directory-alist) - ,(when (boundp 'tramp-bkup-backup-directory-info) - 'tramp-bkup-backup-directory-info) - ;; Dump cache. - (tramp-cache-data . tramp-reporter-dump-variable) - - ;; Non-tramp variables of interest - ;; Mask non-7bit characters - (shell-prompt-pattern . tramp-reporter-dump-variable) - backup-by-copying - backup-by-copying-when-linked - backup-by-copying-when-mismatch - ,(when (boundp 'backup-by-copying-when-privileged-mismatch) - 'backup-by-copying-when-privileged-mismatch) - ,(when (boundp 'password-cache) - 'password-cache) - ,(when (boundp 'password-cache-expiry) - 'password-cache-expiry) - ,(when (boundp 'backup-directory-alist) - 'backup-directory-alist) - ,(when (boundp 'bkup-backup-directory-info) - 'bkup-backup-directory-info) - file-name-handler-alist)) + (sort + (delq nil (mapcar + (lambda (x) + (and x (boundp x) (cons x 'tramp-reporter-dump-variable))) + (append + (mapcar 'intern (all-completions "tramp-" obarray 'boundp)) + ;; Non-tramp variables of interest. + '(shell-prompt-pattern + backup-by-copying + backup-by-copying-when-linked + backup-by-copying-when-mismatch + backup-by-copying-when-privileged-mismatch + backup-directory-alist + bkup-backup-directory-info + password-cache + password-cache-expiry + remote-file-name-inhibit-cache + file-name-handler-alist)))) + (lambda (x y) (string< (symbol-name (car x)) (symbol-name (car y))))) 'tramp-load-report-modules ; pre-hook 'tramp-append-tramp-buffers ; post-hook @@ -238,8 +201,7 @@ buffer in your bug report. ")))) (defun tramp-reporter-dump-variable (varsym mailbuf) - "Pretty-print the value of the variable in symbol VARSYM. -Used for non-7bit chars in strings." + "Pretty-print the value of the variable in symbol VARSYM." (let* ((reporter-eval-buffer (symbol-value 'reporter-eval-buffer)) (val (with-current-buffer reporter-eval-buffer (symbol-value varsym)))) @@ -247,12 +209,13 @@ Used for non-7bit chars in strings." (if (hash-table-p val) ;; Pretty print the cache. (set varsym (read (format "(%s)" (tramp-cache-print val)))) - ;; There are characters to be masked. + ;; There are non-7bit characters to be masked. (when (and (boundp 'mm-7bit-chars) + (stringp val) (string-match (concat "[^" (symbol-value 'mm-7bit-chars) "]") val)) (with-current-buffer reporter-eval-buffer - (set varsym (format "(base64-decode-string \"%s\"" + (set varsym (format "(base64-decode-string \"%s\")" (base64-encode-string val)))))) ;; Dump variable. @@ -268,7 +231,7 @@ Used for non-7bit chars in strings." "\\(\")\\)" "\"$")) ;; \4 " (replace-match "\\1\\2\\3\\4") (beginning-of-line) - (insert " ;; variable encoded due to non-printable characters\n")) + (insert " ;; Variable encoded due to non-printable characters.\n")) (forward-line 1)) ;; Reset VARSYM to old value. @@ -277,7 +240,6 @@ Used for non-7bit chars in strings." (defun tramp-load-report-modules () "Load needed modules for reporting." - ;; We load message.el and mml.el from Gnus. (if (featurep 'xemacs) (progn @@ -290,7 +252,6 @@ Used for non-7bit chars in strings." (defun tramp-append-tramp-buffers () "Append Tramp buffers and buffer local variables into the bug report." - (goto-char (point-max)) ;; Dump buffer local variables. |