2017-03-23 14:58:04 +01:00
|
|
|
;;; tramp-cmds.el --- Interactive commands for Tramp -*- lexical-binding:t -*-
|
2007-10-21 14:02:38 +00:00
|
|
|
|
2020-01-01 00:19:43 +00:00
|
|
|
;; Copyright (C) 2007-2020 Free Software Foundation, Inc.
|
2007-10-21 14:02:38 +00:00
|
|
|
|
|
|
|
;; Author: Michael Albinus <michael.albinus@gmx.de>
|
|
|
|
;; Keywords: comm, processes
|
2010-08-29 12:17:13 -04:00
|
|
|
;; Package: tramp
|
2007-10-21 14:02:38 +00:00
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
2008-05-06 07:31:51 +00:00
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
2007-10-21 14:02:38 +00:00
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 07:31:51 +00:00
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
2007-10-21 14:02:38 +00:00
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2017-09-13 15:52:52 -07:00
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
2007-10-21 14:02:38 +00:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
2011-11-19 23:30:16 -08:00
|
|
|
;; This package provides all interactive commands which are related
|
2007-10-21 14:02:38 +00:00
|
|
|
;; to Tramp.
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(require 'tramp)
|
|
|
|
|
2013-08-15 19:02:09 +02:00
|
|
|
;; Pacify byte-compiler.
|
Remove XEmacs compatibility in Tramp
* doc/misc/tramp.texi: Replace flags by their hard coded name.
Remove unused flags and the enclosed alternative text for XEmacs.
* doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs"
and "xemacs" flags to "unified" and "separate". Remove flags
"emacsgw", "emacsname", "emacsdir", "ftppackagename",
"emacsothername", "emacsotherdir" and "emacsotherfilename".
(trampver):
* lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre".
* lisp/net/tramp.el (bkup-backup-directory-info)
(directory-sep-char, ls-lisp-use-insert-directory-program)
(outline-regexp, tramp-backup-directory-alist)
(tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax)
(tramp-file-name-regexp-unified)
(tramp-file-name-regexp-separate)
(tramp-completion-file-name-regexp-unified)
(tramp-completion-file-name-regexp-separate, tramp-chunksize)
(tramp-get-method-parameter, tramp-find-method, tramp-find-user)
(tramp-debug-message, tramp-progress-reporter-update)
(with-tramp-progress-reporter)
(tramp-rfn-eshadow-setup-minibuffer)
(rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook)
(tramp-rfn-eshadow-update-overlay)
(rfn-eshadow-update-overlay-hook, tramp-default-file-modes)
(tramp-file-name-for-operation)
(tramp-completion-file-name-handler)
(tramp-autoload-file-name-handler, tramp-completion-mode-p)
(tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-handle-dired-uncache, tramp-handle-find-backup-file-name)
(tramp-handle-insert-file-contents, tramp-handle-load)
(tramp-handle-shell-command)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-file-notify-valid-p, tramp-accept-process-output)
(tramp-check-for-regexp, tramp-wait-for-regexp)
(tramp-send-string, tramp-mode-string-to-int)
(tramp-get-local-gid, tramp-check-cached-permissions)
(tramp-get-remote-tmpdir, tramp-make-tramp-temp-file)
(auto-save-file-name-transforms)
(tramp-handle-make-auto-save-file-name, tramp-read-passwd)
(tramp-clear-passwd, tramp-time-diff):
* lisp/net/tramp-adb.el (directory-listing-before-filename-regexp)
(directory-sep-char, tramp-adb-file-name-handler-alist)
(tramp-adb-parse-device-names)
(tramp-adb-handle-expand-file-name)
(tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash)
(tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes)
(tramp-adb-handle-rename-file, tramp-adb-handle-process-file)
(tramp-adb-handle-shell-command)
(tramp-adb-handle-start-file-process, tramp-adb-get-device)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-cache.el (tramp-persistency-file-name)
(tramp-cache-print):
* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections)
(tramp-bug, tramp-reporter-dump-variable)
(tramp-load-report-modules, tramp-append-tramp-buffers):
* lisp/net/tramp-compat.el (tramp-compat-funcall)
(tramp-advice-file-expand-wildcards)
(tramp-compat-temporary-file-directory)
(tramp-compat-make-temp-file, tramp-compat-copy-file)
(tramp-compat-delete-directory, )
(tramp-compat-process-running-p):
* lisp/net/tramp-ftp.el (tramp-methods) <ftp>:
(tramp-default-method-alist, tramp-foreign-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
(tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file)
(tramp-gvfs-handle-file-local-copy)
(tramp-gvfs-handle-file-name-all-completions)
(tramp-gvfs-handle-file-notify-add-watch)
(tramp-gvfs-monitor-file-process-filter)
(tramp-gvfs-handle-file-readable-p)
(tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region)
(tramp-gvfs-file-name, tramp-gvfs-handler-askquestion)
(tramp-gvfs-maybe-open-connection)
(tramp-gvfs-parse-device-names):
* lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel)
(tramp-gw-open-connection, tramp-gw-open-network-stream):
* lisp/net/tramp-sh.el (directory-sep-char)
(tramp-sh-file-name-handler-alist)
(tramp-sh-handle-file-truename)
(tramp-sh-handle-set-visited-file-modtime)
(tramp-sh-handle-verify-visited-file-modtime)
(tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times)
(tramp-sh-handle-file-acl)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-copy-file, tramp-sh-handle-rename-file)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(dired-compress-file-suffixes, dired-remove-file)
(tramp-sh-handle-dired-compress-file)
(tramp-sh-handle-insert-directory)
(tramp-sh-handle-expand-file-name)
(tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy)
(tramp-sh-handle-write-region, tramp-sh-handle-vc-registered)
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter, tramp-maybe-send-script)
(tramp-find-executable)
(tramp-open-connection-setup-interactive-shell)
(tramp-find-inline-encoding, tramp-compute-multi-hops)
(tramp-maybe-open-connection, tramp-convert-file-attributes)
(tramp-get-remote-path, tramp-get-remote-touch):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist)
(tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file)
(tramp-smb-handle-delete-directory)
(tramp-smb-handle-directory-files, tramp-smb-handle-file-acl)
(tramp-smb-handle-make-directory-internal)
(tramp-smb-handle-process-file, tramp-smb-handle-rename-file)
(tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes)
(tramp-smb-handle-write-region, tramp-smb-get-file-entries)
(tramp-smb-get-cifs-capabilities)
(tramp-smb-maybe-open-connection):
* lisp/net/trampver.el (tramp-repository-get-version):
Remove XEmacs compat code.
* lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag)
(reporter-dump-variable): Declare functions.
* lisp/net/tramp.el (tramp-bkup-backup-directory-info)
(tramp-advice-minibuffer-electric-separator)
(tramp-advice-minibuffer-electric-tilde)
(tramp-handle-unhandled-file-name-directory):
* lisp/net/tramp-compat.el (tramp-compat-with-temp-message)
(tramp-compat-font-lock-add-keywords)
(tramp-compat-load, tramp-compat-number-sequence)
(tramp-compat-split-string, tramp-compat-delete-dups):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally):
Remove.
* lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work
recursively.
2016-01-14 14:12:17 +01:00
|
|
|
(declare-function mml-mode "mml")
|
|
|
|
(declare-function mml-insert-empty-tag "mml")
|
|
|
|
(declare-function reporter-dump-variable "reporter")
|
2013-08-17 12:20:15 +02:00
|
|
|
(defvar reporter-eval-buffer)
|
|
|
|
(defvar reporter-prompt-for-summary-p)
|
2013-08-15 19:02:09 +02:00
|
|
|
|
2017-05-12 18:36:41 +02:00
|
|
|
;;;###tramp-autoload
|
2017-04-06 21:00:29 +02:00
|
|
|
(defun tramp-change-syntax (&optional syntax)
|
|
|
|
"Change Tramp syntax.
|
2017-04-08 18:35:06 +02:00
|
|
|
SYNTAX can be one of the symbols `default' (default),
|
|
|
|
`simplified' (ange-ftp like) or `separate' (XEmacs like)."
|
2017-04-06 21:00:29 +02:00
|
|
|
(interactive
|
|
|
|
(let ((input (completing-read
|
2017-04-08 18:35:06 +02:00
|
|
|
"Enter Tramp syntax: " (tramp-syntax-values) nil t
|
2017-04-06 21:00:29 +02:00
|
|
|
(symbol-name tramp-syntax))))
|
|
|
|
(unless (string-equal input "")
|
|
|
|
(list (intern input)))))
|
|
|
|
(when syntax
|
2017-11-07 20:45:58 -05:00
|
|
|
(customize-set-variable 'tramp-syntax syntax)))
|
2017-04-06 21:00:29 +02:00
|
|
|
|
2007-10-21 14:02:38 +00:00
|
|
|
(defun tramp-list-tramp-buffers ()
|
|
|
|
"Return a list of all Tramp connection buffers."
|
|
|
|
(append
|
|
|
|
(all-completions
|
2019-02-28 10:33:05 +01:00
|
|
|
"*tramp" (mapcar #'list (mapcar #'buffer-name (buffer-list))))
|
2007-10-21 14:02:38 +00:00
|
|
|
(all-completions
|
2019-02-28 10:33:05 +01:00
|
|
|
"*debug tramp" (mapcar #'list (mapcar #'buffer-name (buffer-list))))))
|
2007-10-21 14:02:38 +00:00
|
|
|
|
|
|
|
(defun tramp-list-remote-buffers ()
|
Adapt Tramp docstrings according to checkdoc
* lisp/net/tramp.el (tramp-backup-directory-alist)
(tramp-echoed-echo-mark-regexp, tramp-syntax-values)
(tramp-lookup-syntax, tramp-build-prefix-format)
(tramp-build-prefix-regexp, tramp-build-method-regexp)
(tramp-build-postfix-method-format)
(tramp-build-postfix-method-regexp)
(tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp)
(tramp-build-postfix-ipv6-format)
(tramp-build-postfix-ipv6-regexp)
(tramp-build-postfix-host-format)
(tramp-build-postfix-host-regexp, tramp-unknown-id-string)
(tramp-unknown-id-integer, tramp-build-file-name-regexp)
(tramp-build-completion-file-name-regexp, tramp-chunksize)
(tramp-find-method, tramp-find-user, tramp-find-host)
(tramp-dissect-file-name, tramp-get-buffer)
(tramp-get-connection-buffer, tramp-debug-message, tramp-error)
(with-tramp-connection-property, tramp-run-real-handler)
(tramp-file-name-for-operation, tramp-file-name-handler)
(tramp-completion-file-name-handler)
(tramp-completion-handle-file-name-completion)
(tramp-completion-dissect-file-name)
(tramp-completion-dissect-file-name1)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-mode-string-to-int)
(tramp-file-mode-from-int):
* lisp/net/tramp-adb.el (tramp-adb-file-name-p):
* lisp/net/tramp-archive.el (tramp-archive-run-real-handler)
(tramp-archive-file-name-handler)
(tramp-archive-dissect-file-name)
(with-parsed-tramp-archive-file-name)
(tramp-archive-gvfs-file-name, tramp-archive-handle-access-file):
* lisp/net/tramp-cmds.el (tramp-list-remote-buffers):
* lisp/net/tramp-compat.el (tramp-unload-file-name-handlers)
(tramp-compat-funcall, tramp-compat-tramp-file-name-slots):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler)
(tramp-ftp-file-name-p):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p)
(tramp-gvfs-file-name-handler)
(tramp-gvfs-stringify-dbus-message)
(tramp-gvfs-monitor-process-filter)
(tramp-gvfs-handler-mounted-unmounted):
* lisp/net/tramp-integration.el
(tramp-rfn-eshadow-update-overlay-regexp):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-p)
(tramp-rclone-file-name-handler, tramp-rclone-send-command):
* lisp/net/tramp-sh.el (tramp-sh--quoting-style-options)
(tramp-sh-gio-monitor-process-filter)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter, tramp-find-executable)
(tramp-set-remote-path, tramp-open-shell, tramp-find-shell)
(tramp-send-command-and-check, tramp-shell-case-fold)
(tramp-get-remote-path):
* lisp/net/tramp-smb.el (tramp-smb-file-name-p)
(tramp-smb-file-name-handler)
(tramp-smb-do-file-attributes-with-stat)
(tramp-smb-handle-substitute-in-file-name)
(tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p)
(tramp-sudoedit-file-name-handler)
(tramp-sudoedit-send-command-string):
* test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all):
* test/lisp/net/tramp-tests.el (tramp--test-gvfs-p)
(tramp--test-with-proper-process-name-and-buffer)
(tramp-test-all): Adapt docstrings according to `checkdoc'.
2019-11-13 13:10:58 +01:00
|
|
|
"Return a list of all buffers with remote `default-directory'."
|
2007-10-21 14:02:38 +00:00
|
|
|
(delq
|
|
|
|
nil
|
|
|
|
(mapcar
|
|
|
|
(lambda (x)
|
2013-10-17 21:39:22 +02:00
|
|
|
(with-current-buffer x (when (tramp-tramp-file-p default-directory) x)))
|
2007-10-21 14:02:38 +00:00
|
|
|
(buffer-list))))
|
|
|
|
|
2019-02-25 11:59:52 +01:00
|
|
|
;;;###tramp-autoload
|
|
|
|
(defvar tramp-cleanup-connection-hook nil
|
|
|
|
"List of functions to be called after Tramp connection is cleaned up.
|
|
|
|
Each function is called with the current vector as argument.")
|
|
|
|
|
2010-09-16 22:43:12 +02:00
|
|
|
;;;###tramp-autoload
|
2020-05-03 13:59:50 +02:00
|
|
|
(defun tramp-cleanup-connection
|
|
|
|
(vec &optional keep-debug keep-password keep-processes)
|
2007-10-21 14:02:38 +00:00
|
|
|
"Flush all connection related objects.
|
2013-09-10 09:45:33 +02:00
|
|
|
This includes password cache, file cache, connection cache,
|
2020-05-03 13:59:50 +02:00
|
|
|
buffers, processes. KEEP-DEBUG non-nil preserves the debug
|
|
|
|
buffer. KEEP-PASSWORD non-nil preserves the password cache.
|
|
|
|
KEEP-PROCESSES non-nil preserves the asynchronous processes.
|
2007-10-21 14:02:38 +00:00
|
|
|
When called interactively, a Tramp connection has to be selected."
|
|
|
|
(interactive
|
|
|
|
;; When interactive, select the Tramp remote identification.
|
|
|
|
;; Return nil when there is no Tramp connection.
|
|
|
|
(list
|
|
|
|
(let ((connections
|
2019-02-28 10:33:05 +01:00
|
|
|
(mapcar #'tramp-make-tramp-file-name (tramp-list-connections)))
|
2007-10-21 14:02:38 +00:00
|
|
|
name)
|
|
|
|
|
|
|
|
(when connections
|
|
|
|
(setq name
|
|
|
|
(completing-read
|
|
|
|
"Enter Tramp connection: " connections nil t
|
|
|
|
(try-completion "" connections)))
|
2013-10-17 21:39:22 +02:00
|
|
|
(and (tramp-tramp-file-p name) (tramp-dissect-file-name name))))
|
2013-09-10 09:45:33 +02:00
|
|
|
nil nil))
|
2007-10-21 14:02:38 +00:00
|
|
|
|
|
|
|
(if (not vec)
|
|
|
|
;; Nothing to do.
|
|
|
|
(message "No Tramp connection found.")
|
|
|
|
|
|
|
|
;; Flush password cache.
|
2013-09-10 09:45:33 +02:00
|
|
|
(unless keep-password (tramp-clear-passwd vec))
|
2007-10-21 14:02:38 +00:00
|
|
|
|
2013-11-25 15:51:34 +01:00
|
|
|
;; Cleanup `tramp-current-connection'. Otherwise, we would be
|
2019-02-25 11:59:52 +01:00
|
|
|
;; suppressed.
|
|
|
|
(setq tramp-current-connection nil)
|
2013-11-25 15:51:34 +01:00
|
|
|
|
2019-06-28 16:32:12 +02:00
|
|
|
;; Cancel timer.
|
|
|
|
(dolist (timer timer-list)
|
|
|
|
(when (and (eq (timer--function timer) 'tramp-timeout-session)
|
|
|
|
(tramp-file-name-equal-p vec (car (timer--args timer))))
|
|
|
|
(cancel-timer timer)))
|
|
|
|
|
2020-03-29 12:24:04 +02:00
|
|
|
;; Delete processes.
|
|
|
|
(dolist (key (hash-table-keys tramp-cache-data))
|
|
|
|
(when (and (processp key)
|
2020-05-03 13:59:50 +02:00
|
|
|
(tramp-file-name-equal-p (process-get key 'vector) vec)
|
|
|
|
(or (not keep-processes)
|
|
|
|
(eq key (tramp-get-process vec))))
|
2020-03-29 12:24:04 +02:00
|
|
|
(tramp-flush-connection-properties key)
|
|
|
|
(delete-process key)))
|
|
|
|
|
2007-10-21 14:02:38 +00:00
|
|
|
;; Remove buffers.
|
|
|
|
(dolist
|
|
|
|
(buf (list (get-buffer (tramp-buffer-name vec))
|
2013-09-10 09:45:33 +02:00
|
|
|
(unless keep-debug
|
|
|
|
(get-buffer (tramp-debug-buffer-name vec)))
|
2007-10-21 14:02:38 +00:00
|
|
|
(tramp-get-connection-property vec "process-buffer" nil)))
|
2019-02-24 11:15:49 +01:00
|
|
|
(when (bufferp buf) (kill-buffer buf)))
|
|
|
|
|
2020-03-29 12:24:04 +02:00
|
|
|
;; Flush file cache.
|
|
|
|
(tramp-flush-directory-properties vec "")
|
|
|
|
|
|
|
|
;; Flush connection cache.
|
|
|
|
(tramp-flush-connection-properties vec)
|
|
|
|
|
2019-02-25 11:59:52 +01:00
|
|
|
;; The end.
|
|
|
|
(run-hook-with-args 'tramp-cleanup-connection-hook vec)))
|
2007-10-21 14:02:38 +00:00
|
|
|
|
2011-07-04 14:12:38 +02:00
|
|
|
;;;###tramp-autoload
|
|
|
|
(defun tramp-cleanup-this-connection ()
|
|
|
|
"Flush all connection related objects of the current buffer's connection."
|
|
|
|
(interactive)
|
2013-10-17 21:39:22 +02:00
|
|
|
(and (tramp-tramp-file-p default-directory)
|
2011-07-04 14:12:38 +02:00
|
|
|
(tramp-cleanup-connection
|
|
|
|
(tramp-dissect-file-name default-directory 'noexpand))))
|
|
|
|
|
2019-02-25 11:59:52 +01:00
|
|
|
;;;###tramp-autoload
|
|
|
|
(defvar tramp-cleanup-all-connections-hook nil
|
|
|
|
"List of functions to be called after all Tramp connections are cleaned up.")
|
|
|
|
|
2010-10-02 15:21:43 +02:00
|
|
|
;;;###tramp-autoload
|
2007-10-21 14:02:38 +00:00
|
|
|
(defun tramp-cleanup-all-connections ()
|
|
|
|
"Flush all Tramp internal objects.
|
|
|
|
This includes password cache, file cache, connection cache, buffers."
|
|
|
|
(interactive)
|
|
|
|
|
2008-06-15 13:40:27 +00:00
|
|
|
;; Unlock Tramp.
|
|
|
|
(setq tramp-locked nil)
|
|
|
|
|
2007-10-21 14:02:38 +00:00
|
|
|
;; Flush password cache.
|
Remove XEmacs compatibility in Tramp
* doc/misc/tramp.texi: Replace flags by their hard coded name.
Remove unused flags and the enclosed alternative text for XEmacs.
* doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs"
and "xemacs" flags to "unified" and "separate". Remove flags
"emacsgw", "emacsname", "emacsdir", "ftppackagename",
"emacsothername", "emacsotherdir" and "emacsotherfilename".
(trampver):
* lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre".
* lisp/net/tramp.el (bkup-backup-directory-info)
(directory-sep-char, ls-lisp-use-insert-directory-program)
(outline-regexp, tramp-backup-directory-alist)
(tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax)
(tramp-file-name-regexp-unified)
(tramp-file-name-regexp-separate)
(tramp-completion-file-name-regexp-unified)
(tramp-completion-file-name-regexp-separate, tramp-chunksize)
(tramp-get-method-parameter, tramp-find-method, tramp-find-user)
(tramp-debug-message, tramp-progress-reporter-update)
(with-tramp-progress-reporter)
(tramp-rfn-eshadow-setup-minibuffer)
(rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook)
(tramp-rfn-eshadow-update-overlay)
(rfn-eshadow-update-overlay-hook, tramp-default-file-modes)
(tramp-file-name-for-operation)
(tramp-completion-file-name-handler)
(tramp-autoload-file-name-handler, tramp-completion-mode-p)
(tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-handle-dired-uncache, tramp-handle-find-backup-file-name)
(tramp-handle-insert-file-contents, tramp-handle-load)
(tramp-handle-shell-command)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-file-notify-valid-p, tramp-accept-process-output)
(tramp-check-for-regexp, tramp-wait-for-regexp)
(tramp-send-string, tramp-mode-string-to-int)
(tramp-get-local-gid, tramp-check-cached-permissions)
(tramp-get-remote-tmpdir, tramp-make-tramp-temp-file)
(auto-save-file-name-transforms)
(tramp-handle-make-auto-save-file-name, tramp-read-passwd)
(tramp-clear-passwd, tramp-time-diff):
* lisp/net/tramp-adb.el (directory-listing-before-filename-regexp)
(directory-sep-char, tramp-adb-file-name-handler-alist)
(tramp-adb-parse-device-names)
(tramp-adb-handle-expand-file-name)
(tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash)
(tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes)
(tramp-adb-handle-rename-file, tramp-adb-handle-process-file)
(tramp-adb-handle-shell-command)
(tramp-adb-handle-start-file-process, tramp-adb-get-device)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-cache.el (tramp-persistency-file-name)
(tramp-cache-print):
* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections)
(tramp-bug, tramp-reporter-dump-variable)
(tramp-load-report-modules, tramp-append-tramp-buffers):
* lisp/net/tramp-compat.el (tramp-compat-funcall)
(tramp-advice-file-expand-wildcards)
(tramp-compat-temporary-file-directory)
(tramp-compat-make-temp-file, tramp-compat-copy-file)
(tramp-compat-delete-directory, )
(tramp-compat-process-running-p):
* lisp/net/tramp-ftp.el (tramp-methods) <ftp>:
(tramp-default-method-alist, tramp-foreign-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
(tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file)
(tramp-gvfs-handle-file-local-copy)
(tramp-gvfs-handle-file-name-all-completions)
(tramp-gvfs-handle-file-notify-add-watch)
(tramp-gvfs-monitor-file-process-filter)
(tramp-gvfs-handle-file-readable-p)
(tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region)
(tramp-gvfs-file-name, tramp-gvfs-handler-askquestion)
(tramp-gvfs-maybe-open-connection)
(tramp-gvfs-parse-device-names):
* lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel)
(tramp-gw-open-connection, tramp-gw-open-network-stream):
* lisp/net/tramp-sh.el (directory-sep-char)
(tramp-sh-file-name-handler-alist)
(tramp-sh-handle-file-truename)
(tramp-sh-handle-set-visited-file-modtime)
(tramp-sh-handle-verify-visited-file-modtime)
(tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times)
(tramp-sh-handle-file-acl)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-copy-file, tramp-sh-handle-rename-file)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(dired-compress-file-suffixes, dired-remove-file)
(tramp-sh-handle-dired-compress-file)
(tramp-sh-handle-insert-directory)
(tramp-sh-handle-expand-file-name)
(tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy)
(tramp-sh-handle-write-region, tramp-sh-handle-vc-registered)
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter, tramp-maybe-send-script)
(tramp-find-executable)
(tramp-open-connection-setup-interactive-shell)
(tramp-find-inline-encoding, tramp-compute-multi-hops)
(tramp-maybe-open-connection, tramp-convert-file-attributes)
(tramp-get-remote-path, tramp-get-remote-touch):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist)
(tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file)
(tramp-smb-handle-delete-directory)
(tramp-smb-handle-directory-files, tramp-smb-handle-file-acl)
(tramp-smb-handle-make-directory-internal)
(tramp-smb-handle-process-file, tramp-smb-handle-rename-file)
(tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes)
(tramp-smb-handle-write-region, tramp-smb-get-file-entries)
(tramp-smb-get-cifs-capabilities)
(tramp-smb-maybe-open-connection):
* lisp/net/trampver.el (tramp-repository-get-version):
Remove XEmacs compat code.
* lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag)
(reporter-dump-variable): Declare functions.
* lisp/net/tramp.el (tramp-bkup-backup-directory-info)
(tramp-advice-minibuffer-electric-separator)
(tramp-advice-minibuffer-electric-tilde)
(tramp-handle-unhandled-file-name-directory):
* lisp/net/tramp-compat.el (tramp-compat-with-temp-message)
(tramp-compat-font-lock-add-keywords)
(tramp-compat-load, tramp-compat-number-sequence)
(tramp-compat-split-string, tramp-compat-delete-dups):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally):
Remove.
* lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work
recursively.
2016-01-14 14:12:17 +01:00
|
|
|
(password-reset)
|
2007-10-21 14:02:38 +00:00
|
|
|
|
|
|
|
;; Flush file and connection cache.
|
|
|
|
(clrhash tramp-cache-data)
|
|
|
|
|
2018-11-06 15:48:05 +01:00
|
|
|
;; Remove ad-hoc proxies.
|
|
|
|
(let ((proxies tramp-default-proxies-alist))
|
|
|
|
(while proxies
|
|
|
|
(if (ignore-errors
|
|
|
|
(get-text-property 0 'tramp-ad-hoc (nth 2 (car proxies))))
|
|
|
|
(setq tramp-default-proxies-alist
|
|
|
|
(delete (car proxies) tramp-default-proxies-alist)
|
|
|
|
proxies tramp-default-proxies-alist)
|
|
|
|
(setq proxies (cdr proxies)))))
|
2019-06-28 16:32:12 +02:00
|
|
|
(when (and tramp-default-proxies-alist tramp-save-ad-hoc-proxies)
|
|
|
|
(customize-save-variable
|
|
|
|
'tramp-default-proxies-alist tramp-default-proxies-alist))
|
|
|
|
|
|
|
|
;; Cancel timers.
|
|
|
|
(cancel-function-timers 'tramp-timeout-session)
|
2018-11-06 15:48:05 +01:00
|
|
|
|
2020-06-07 16:56:59 +02:00
|
|
|
;; Remove processes and buffers.
|
2007-10-21 14:02:38 +00:00
|
|
|
(dolist (name (tramp-list-tramp-buffers))
|
2020-06-07 16:56:59 +02:00
|
|
|
(when (processp (get-buffer-process name)) (delete-process name))
|
2019-02-24 11:15:49 +01:00
|
|
|
(when (bufferp (get-buffer name)) (kill-buffer name)))
|
|
|
|
|
2019-02-25 11:59:52 +01:00
|
|
|
;; The end.
|
|
|
|
(run-hooks 'tramp-cleanup-all-connections-hook))
|
2007-10-21 14:02:38 +00:00
|
|
|
|
2010-10-02 15:21:43 +02:00
|
|
|
;;;###tramp-autoload
|
2007-10-21 14:02:38 +00:00
|
|
|
(defun tramp-cleanup-all-buffers ()
|
|
|
|
"Kill all remote buffers."
|
|
|
|
(interactive)
|
|
|
|
|
2016-01-23 16:20:21 +01:00
|
|
|
;; Remove all Tramp related connections.
|
2007-10-21 14:02:38 +00:00
|
|
|
(tramp-cleanup-all-connections)
|
|
|
|
|
|
|
|
;; Remove all buffers with a remote default-directory.
|
|
|
|
(dolist (name (tramp-list-remote-buffers))
|
|
|
|
(when (bufferp (get-buffer name)) (kill-buffer name))))
|
|
|
|
|
2019-11-20 13:45:30 +01:00
|
|
|
;;;###tramp-autoload
|
|
|
|
(defcustom tramp-default-rename-alist nil
|
|
|
|
"Default target for renaming remote buffer file names.
|
|
|
|
This is an alist of cons cells (SOURCE . TARGET). The first
|
|
|
|
matching item specifies the target to be applied for renaming
|
|
|
|
buffer file names from source via `tramp-rename-files'. SOURCE
|
|
|
|
is a regular expressions, which matches a remote file name.
|
|
|
|
TARGET must be a directory name, which could be remote (including
|
|
|
|
remote directories Tramp infers by default, such as
|
|
|
|
\"/method:user@host:\").
|
|
|
|
|
|
|
|
TARGET can contain the patterns %m, %u or %h, which are replaced
|
|
|
|
by the method name, user name or host name of SOURCE when calling
|
|
|
|
`tramp-rename-files'.
|
|
|
|
|
|
|
|
SOURCE could also be a Lisp form, which will be evaluated. The
|
|
|
|
result must be a string or nil, which is interpreted as a regular
|
|
|
|
expression which always matches."
|
|
|
|
:group 'tramp
|
|
|
|
:version "27.1"
|
|
|
|
:type '(repeat (cons (choice :tag "Source regexp" regexp sexp)
|
|
|
|
(choice :tag "Target name" string (const nil)))))
|
|
|
|
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(defcustom tramp-confirm-rename-file-names t
|
|
|
|
"Whether renaming a buffer file name must be confirmed."
|
|
|
|
:group 'tramp
|
|
|
|
:version "27.1"
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
|
|
(defun tramp-default-rename-file (string)
|
|
|
|
"Determine default file name for renaming according to STRING.
|
|
|
|
The user option `tramp-default-rename-alist' is consulted,
|
|
|
|
finding the default mapping. If there is no matching entry, the
|
|
|
|
function returns nil"
|
|
|
|
(when (tramp-tramp-file-p string)
|
|
|
|
(let ((tdra tramp-default-rename-alist)
|
|
|
|
(method (or (file-remote-p string 'method) ""))
|
|
|
|
(user (or (file-remote-p string 'user) ""))
|
|
|
|
(host (or (file-remote-p string 'host) ""))
|
|
|
|
item result)
|
|
|
|
(while (setq item (pop tdra))
|
|
|
|
(when (string-match-p (or (eval (car item)) "") string)
|
|
|
|
(setq tdra nil
|
|
|
|
result
|
|
|
|
(format-spec
|
|
|
|
(cdr item) (format-spec-make ?m method ?u user ?h host)))))
|
|
|
|
result)))
|
|
|
|
|
|
|
|
(defsubst tramp-rename-read-file-name-dir (string)
|
|
|
|
"Return the DIR entry to be applied in `read-file-name', based on STRING."
|
|
|
|
(when (tramp-tramp-file-p string)
|
|
|
|
(substring (file-remote-p string) 0 -1)))
|
|
|
|
|
|
|
|
(defsubst tramp-rename-read-file-name-init (string)
|
|
|
|
"Return the INIT entry to be applied in `read-file-name', based on STRING."
|
|
|
|
(when (tramp-tramp-file-p string)
|
|
|
|
(string-remove-prefix (tramp-rename-read-file-name-dir string) string)))
|
|
|
|
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(defun tramp-rename-files (source target)
|
|
|
|
"Replace in all buffers the visiting file name from SOURCE to TARGET.
|
|
|
|
SOURCE is a remote directory name, which could contain also a
|
|
|
|
localname part. TARGET is the directory name SOURCE is replaced
|
|
|
|
with. Often, TARGET is a remote directory name on another host,
|
|
|
|
but it can also be a local directory name. If TARGET has no
|
|
|
|
local part, the local part from SOURCE is used.
|
|
|
|
|
|
|
|
If TARGET is nil, it is selected according to the first match in
|
|
|
|
`tramp-default-rename-alist'. If called interactively, this
|
|
|
|
match is offered as initial value for selection.
|
|
|
|
|
|
|
|
On all buffers, which have a `buffer-file-name' matching SOURCE,
|
|
|
|
this name is modified by replacing SOURCE with TARGET. This is
|
|
|
|
applied by calling `set-visited-file-name'. The new
|
|
|
|
`buffer-file-name' is prompted for modification in the
|
|
|
|
minibuffer. The buffers are marked modified, and must be saved
|
|
|
|
explicitly.
|
|
|
|
|
|
|
|
If user option `tramp-confirm-rename-file-names' is nil, changing
|
|
|
|
the file name happens without confirmation. This requires a
|
|
|
|
matching entry in `tramp-default-rename-alist'.
|
|
|
|
|
|
|
|
Remote buffers related to the remote connection identified by
|
|
|
|
SOURCE, which are not visiting files, or which are visiting files
|
|
|
|
not matching SOURCE, are not modified.
|
|
|
|
|
|
|
|
Interactively, TARGET is selected from `tramp-default-rename-alist'
|
|
|
|
without confirmation if the prefix argument is non-nil.
|
|
|
|
|
|
|
|
The remote connection identified by SOURCE is flushed by
|
|
|
|
`tramp-cleanup-connection'."
|
|
|
|
(interactive
|
|
|
|
(let ((connections
|
|
|
|
(mapcar #'tramp-make-tramp-file-name (tramp-list-connections)))
|
|
|
|
;; Completion packages do their voodoo in `completing-read'
|
|
|
|
;; and `read-file-name', which is often incompatible with
|
|
|
|
;; Tramp. Ignore them.
|
|
|
|
(completing-read-function #'completing-read-default)
|
|
|
|
(read-file-name-function #'read-file-name-default)
|
|
|
|
source target)
|
|
|
|
(if (null connections)
|
|
|
|
(tramp-user-error nil "There are no remote connections.")
|
|
|
|
(setq source
|
|
|
|
;; Likely, the source remote connection is broken. So we
|
|
|
|
;; shall avoid any action on it.
|
|
|
|
(let (non-essential)
|
|
|
|
(completing-read-default
|
|
|
|
"Enter old Tramp connection: "
|
|
|
|
;; Completion function.
|
|
|
|
(completion-table-dynamic
|
|
|
|
(lambda (string)
|
|
|
|
(cond
|
|
|
|
;; Initially, show existing remote connections.
|
|
|
|
((not (tramp-tramp-file-p string))
|
|
|
|
(all-completions string connections))
|
|
|
|
;; There is a selected remote connection. Show
|
|
|
|
;; its longest common directory path of respective
|
|
|
|
;; buffers.
|
|
|
|
(t (mapcar
|
|
|
|
(lambda (buffer)
|
|
|
|
(let ((bfn (buffer-file-name buffer)))
|
|
|
|
(and (buffer-live-p buffer)
|
|
|
|
(tramp-equal-remote string bfn)
|
|
|
|
(stringp bfn) (file-name-directory bfn))))
|
|
|
|
(tramp-list-remote-buffers))))))
|
|
|
|
#'tramp-tramp-file-p t
|
|
|
|
;; If the current buffer is a remote one, it is likely
|
|
|
|
;; that this connection is meant. So we offer it as
|
|
|
|
;; initial value. Otherwise, use the longest remote
|
|
|
|
;; connection path as initial value.
|
|
|
|
(or (file-remote-p default-directory)
|
|
|
|
(try-completion "" connections))))
|
|
|
|
|
|
|
|
target
|
|
|
|
(when (null current-prefix-arg)
|
|
|
|
;; The source remote connection shall not trigger any action.
|
|
|
|
;; FIXME: Better error prompt when trying to access source host.
|
|
|
|
(let* ((default (or (tramp-default-rename-file source) source))
|
|
|
|
(dir (tramp-rename-read-file-name-dir default))
|
|
|
|
(init (tramp-rename-read-file-name-init default))
|
|
|
|
(tramp-ignored-file-name-regexp
|
|
|
|
(regexp-quote (file-remote-p source))))
|
|
|
|
(read-file-name-default
|
|
|
|
"Enter new Tramp connection: "
|
|
|
|
dir default 'confirm init #'file-directory-p)))))
|
|
|
|
|
|
|
|
(list source target)))
|
|
|
|
|
|
|
|
(unless (tramp-tramp-file-p source)
|
|
|
|
(tramp-user-error nil "Source %s must be remote." source))
|
|
|
|
(when (null target)
|
|
|
|
(or (setq target (tramp-default-rename-file source))
|
|
|
|
(tramp-user-error
|
|
|
|
nil
|
2020-07-12 15:02:56 +02:00
|
|
|
(concat "There is no target specified. "
|
|
|
|
"Check `tramp-default-rename-alist' for a proper entry."))))
|
2019-11-20 13:45:30 +01:00
|
|
|
(when (tramp-equal-remote source target)
|
|
|
|
(tramp-user-error nil "Source and target must have different remote."))
|
|
|
|
|
|
|
|
;; Append local file name if none is specified.
|
|
|
|
(when (string-equal (file-remote-p target) target)
|
2020-01-06 12:11:53 +01:00
|
|
|
(setq target (concat target (tramp-file-local-name source))))
|
2019-12-09 18:44:35 -08:00
|
|
|
;; Make them directory names.
|
2019-11-20 13:45:30 +01:00
|
|
|
(setq source (directory-file-name source)
|
|
|
|
target (directory-file-name target))
|
|
|
|
|
|
|
|
;; Rename visited file names of source buffers.
|
|
|
|
(save-window-excursion
|
|
|
|
(save-current-buffer
|
|
|
|
(let ((help-form "\
|
|
|
|
Type SPC or `y' to set visited file name,
|
|
|
|
DEL or `n' to skip to next,
|
|
|
|
`e' to edit the visited file name,
|
|
|
|
ESC or `q' to quit without changing further buffers,
|
|
|
|
`!' to change all remaining buffers with no more questions.")
|
|
|
|
(query-choices '(?y ?\s ?n ?\177 ?! ?e ?q ?\e))
|
|
|
|
(query (unless tramp-confirm-rename-file-names ?!))
|
|
|
|
changed-buffers)
|
|
|
|
(dolist (buffer (tramp-list-remote-buffers))
|
|
|
|
(switch-to-buffer buffer)
|
|
|
|
(let* ((bfn (buffer-file-name))
|
|
|
|
(new-bfn (and (stringp bfn)
|
|
|
|
(replace-regexp-in-string
|
|
|
|
(regexp-quote source) target bfn)))
|
|
|
|
(prompt (format-message
|
|
|
|
"Set visited file name to `%s' [Type yn!eq or %s] "
|
|
|
|
new-bfn (key-description (vector help-char)))))
|
|
|
|
(when (and (buffer-live-p buffer) (stringp bfn)
|
|
|
|
(string-prefix-p source bfn)
|
|
|
|
;; Skip, and don't ask again.
|
|
|
|
(not (memq query '(?q ?\e))))
|
|
|
|
;; Read prompt.
|
|
|
|
(unless (eq query ?!)
|
|
|
|
(setq query (read-char-choice prompt query-choices)))
|
|
|
|
;; Edit the new buffer file name.
|
|
|
|
(when (eq query ?e)
|
|
|
|
(setq new-bfn
|
|
|
|
(read-file-name
|
|
|
|
"New visited file name: "
|
|
|
|
(file-name-directory new-bfn) new-bfn)))
|
|
|
|
;; Set buffer file name. Remember the change.
|
|
|
|
(when (memq query '(?y ?\s ?! ?e))
|
|
|
|
(setq changed-buffers
|
|
|
|
(cons (list buffer bfn (buffer-modified-p))
|
|
|
|
changed-buffers))
|
|
|
|
(set-visited-file-name new-bfn))
|
|
|
|
;; Quit. Revert changes if prompted by user.
|
|
|
|
(when (and (memq query '(?q ?\e)) changed-buffers
|
|
|
|
(y-or-n-p "Do you want to revert applied changes?"))
|
|
|
|
(dolist (item changed-buffers)
|
|
|
|
(with-current-buffer (car item)
|
|
|
|
(set-visited-file-name (nth 1 item))
|
|
|
|
(set-buffer-modified-p (nth 2 item)))))
|
|
|
|
;; Cleanup echo area.
|
|
|
|
(message nil)))))))
|
|
|
|
|
|
|
|
;; Cleanup.
|
|
|
|
(tramp-cleanup-connection (tramp-dissect-file-name source)))
|
|
|
|
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(defun tramp-rename-these-files (target)
|
|
|
|
"Replace visiting file names to TARGET.
|
|
|
|
The current buffer must be related to a remote connection. In
|
|
|
|
all buffers, which are visiting a file with the same directory
|
|
|
|
name, the buffer file name is changed.
|
|
|
|
|
|
|
|
Interactively, TARGET is selected from `tramp-default-rename-alist'
|
|
|
|
without confirmation if the prefix argument is non-nil.
|
|
|
|
|
|
|
|
For details, see `tramp-rename-files'."
|
|
|
|
(interactive
|
|
|
|
(let ((source default-directory)
|
|
|
|
target
|
|
|
|
;; Completion packages do their voodoo in `completing-read'
|
|
|
|
;; and `read-file-name', which is often incompatible with
|
|
|
|
;; Tramp. Ignore them.
|
|
|
|
(completing-read-function #'completing-read-default)
|
|
|
|
(read-file-name-function #'read-file-name-default))
|
|
|
|
(if (not (tramp-tramp-file-p source))
|
|
|
|
(tramp-user-error
|
|
|
|
nil
|
|
|
|
(substitute-command-keys
|
2020-07-12 15:02:56 +02:00
|
|
|
(concat "Current buffer is not remote. "
|
|
|
|
"Consider `\\[tramp-rename-files]' instead.")))
|
2019-11-20 13:45:30 +01:00
|
|
|
(setq target
|
|
|
|
(when (null current-prefix-arg)
|
|
|
|
;; The source remote connection shall not trigger any action.
|
|
|
|
;; FIXME: Better error prompt when trying to access source host.
|
|
|
|
(let* ((default (or (tramp-default-rename-file source) source))
|
|
|
|
(dir (tramp-rename-read-file-name-dir default))
|
|
|
|
(init (tramp-rename-read-file-name-init default))
|
|
|
|
(tramp-ignored-file-name-regexp
|
|
|
|
(regexp-quote (file-remote-p source))))
|
|
|
|
(read-file-name-default
|
|
|
|
(format "Change Tramp connection `%s': " source)
|
|
|
|
dir default 'confirm init #'file-directory-p)))))
|
|
|
|
(list target)))
|
|
|
|
|
|
|
|
(tramp-rename-files default-directory target))
|
|
|
|
|
2007-10-27 13:57:43 +00:00
|
|
|
;; Tramp version is useful in a number of situations.
|
|
|
|
|
Migrate to Tramp 2.2. Rearrange load dependencies.
(Bug#1529, Bug#5448, Bug#5705)
* Makefile.in (TRAMP_DIR, TRAMP_SRC): New variables.
($(TRAMP_DIR)/tramp-loaddefs.el): New target.
(LOADDEFS): Add $(lisp)/net/tramp-loaddefs.el.
* net/tramp.el (top): Remove all other tramp-* loads except
tramp-compat.el. Remove all changes to tramp-unload-hook for
other tramp-* packages. Rearrange defun order. Change calls of
`tramp-compat-call-process', `tramp-compat-decimal-to-octal',
`tramp-compat-octal-to-decimal' to new function names.
(tramp-terminal-type, tramp-initial-end-of-output)
(tramp-methods, tramp-foreign-file-name-handler-alist)
(tramp-tramp-file-p, tramp-completion-mode-p)
(tramp-send-command-and-check, tramp-get-remote-path)
(tramp-get-remote-tmpdir, tramp-get-remote-ln)
(tramp-shell-quote-argument): Set tramp-autoload cookie.
(with-file-property, with-connection-property): Move to
tramp-cache.el.
(tramp-local-call-process, tramp-decimal-to-octal)
(tramp-octal-to-decimal): Move to tramp-compat.el.
(tramp-handle-shell-command): Do not require 'shell.
(tramp-compute-multi-hops): No special handling for tramp-gw-*
symbols.
(tramp-unload-tramp): Do not call `tramp-unload-file-name-handlers'.
* net/tramp-cache.el (top): Require 'tramp. Add to
`tramp-unload-hook'.
(tramp-cache-data, tramp-get-file-property)
(tramp-set-file-property, tramp-flush-file-property)
(tramp-flush-directory-property, tramp-get-connection-property)
(tramp-set-connection-property, tramp-flush-connection-property)
(tramp-cache-print, tramp-list-connections): Set tramp-autoload
cookie.
(with-file-property, with-connection-property): New defuns, moved
from tramp.el.
(tramp-flush-file-function): Use `with-parsed-tramp-file-name'
macro.
* net/tramp-cmds.el (top): Add to `tramp-unload-hook'.
(tramp-version): Set tramp-autoload cookie.
* net/tramp-compat.el (top): Require 'tramp-loaddefs. Remove all
changes to tramp-unload-hook for other tramp-* packages. Add to
`tramp-unload-hook'.
(tramp-compat-decimal-to-octal, tramp-compat-octal-to-decimal)
(tramp-compat-call-process): New defuns, moved from tramp.el.
* net/tramp-fish.el (top) Require just 'tramp. Add objects to
`tramp-methods' and `tramp-foreign-file-name-handler-alist'. Add
to `tramp-unload-hook'. Change call of
`tramp-compat-decimal-to-octal' to new function name.
(tramp-fish-method): Make it a defconst.
(tramp-fish-file-name-p): Make it a defsubst.
(tramp-fish-method, tramp-fish-file-name-handler)
(tramp-fish-file-name-p): Set tramp-autoload cookie.
* net/tramp-ftp.el (top) Add objects to `tramp-methods' and
`tramp-foreign-file-name-handler-alist'. Add to
`tramp-unload-hook'.
(tramp-ftp-method): Make it a defconst.
(tramp-ftp-file-name-p): Make it a defsubst.
(tramp-ftp-method, tramp-ftp-file-name-handler)
(tramp-ftp-file-name-p): Set tramp-autoload cookie.
* net/tramp-gvfs.el (top) Add objects to `tramp-methods' and
`tramp-foreign-file-name-handler-alist'. Add to
`tramp-unload-hook'. Change checks, whether package can be
loaded.
(tramp-gvfs-file-name-p): Make it a defsubst.
(tramp-gvfs-methods, tramp-gvfs-file-name-handler)
(tramp-gvfs-file-name-p): Set tramp-autoload cookie.
(tramp-gvfs-handle-file-directory-p): New defun.
(tramp-gvfs-file-name-handler-alist): Use it.
* net/tramp-gw.el (top) Add objects to `tramp-methods' and
`tramp-foreign-file-name-handler-alist'. Add to
`tramp-unload-hook'.
(tramp-gw-tunnel-method, tramp-gw-default-tunnel-port)
(tramp-gw-socks-method, tramp-gw-default-socks-port): Make it a
defconst.
(tramp-gw-tunnel-method, tramp-gw-socks-method)
(tramp-gw-open-connection): Set tramp-autoload cookie.
* net/tramp-imap.el (top) Require just 'tramp. Add objects to
`tramp-methods' and `tramp-foreign-file-name-handler-alist'. Add
to `tramp-unload-hook'. Change checks, whether package can be
loaded.
(tramp-imap-file-name-p): Make it a defsubst.
(tramp-imap-method, tramp-imaps-method)
(tramp-imap-file-name-handler)
(tramp-imap-file-name-p): Set tramp-autoload cookie.
* net/tramp-smb.el (top) Require just 'tramp. Add objects to
`tramp-methods' and `tramp-foreign-file-name-handler-alist'. Add
to `tramp-unload-hook'. Change checks, whether package can be
loaded. Change call of `tramp-compat-decimal-to-octal' to new
function name.
(tramp-smb-tunnel-method): Make it a defconst.
(tramp-smb-file-name-p): Make it a defsubst.
(tramp-smb-method, tramp-smb-file-name-handler)
(tramp-smb-file-name-p): Set tramp-autoload cookie.
* net/tramp-uu.el (top) Add to `tramp-unload-hook'.
(tramp-uuencode-region): Set tramp-autoload cookie.
* net/trampver.el (top) Add to `tramp-unload-hook'.
(tramp-version, tramp-bug-report-address): Set tramp-autoload
cookie. Update release number.
2010-09-08 16:42:54 +02:00
|
|
|
;;;###tramp-autoload
|
2007-10-27 13:57:43 +00:00
|
|
|
(defun tramp-version (arg)
|
|
|
|
"Print version number of tramp.el in minibuffer or current buffer."
|
|
|
|
(interactive "P")
|
|
|
|
(if arg (insert tramp-version) (message tramp-version)))
|
|
|
|
|
Fix minor quoting problems in doc strings
These were glitches regardless of how or whether we tackle the
problem of grave accent in doc strings.
* lisp/calc/calc-aent.el (math-restore-placeholders):
* lisp/ido.el (ido-ignore-buffers, ido-ignore-files):
* lisp/leim/quail/cyrillic.el ("bulgarian-alt-phonetic"):
* lisp/leim/quail/hebrew.el ("hebrew-new")
("hebrew-biblical-sil"):
* lisp/leim/quail/thai.el ("thai-kesmanee"):
* lisp/progmodes/idlw-shell.el (idlwave-shell-file-name-chars):
Used curved quotes to avoid ambiguities like ‘`''’ in doc strings.
* lisp/calendar/calendar.el (calendar-month-abbrev-array):
* lisp/cedet/semantic/mru-bookmark.el (semantic-mrub-cache-flush-fcn):
* lisp/cedet/semantic/symref.el (semantic-symref-tool-baseclass):
* lisp/cedet/semantic/tag.el (semantic-tag-copy)
(semantic-tag-components):
* lisp/cedet/srecode/cpp.el (srecode-semantic-handle-:cpp):
* lisp/cedet/srecode/texi.el (srecode-texi-texify-docstring):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-all-constp):
* lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-engine):
* lisp/emacs-lisp/generator.el (iter-next):
* lisp/gnus/gnus-art.el (gnus-treat-strip-list-identifiers)
(gnus-article-mode-syntax-table):
* lisp/net/rlogin.el (rlogin-directory-tracking-mode):
* lisp/net/soap-client.el (soap-wsdl-get):
* lisp/net/telnet.el (telnet-mode):
* lisp/org/org-compat.el (org-number-sequence):
* lisp/org/org.el (org-remove-highlights-with-change)
(org-structure-template-alist):
* lisp/org/ox-html.el (org-html-link-org-files-as-html):
* lisp/play/handwrite.el (handwrite-10pt, handwrite-11pt)
(handwrite-12pt, handwrite-13pt):
* lisp/progmodes/f90.el (f90-mode, f90-abbrev-start):
* lisp/progmodes/idlwave.el (idlwave-mode, idlwave-check-abbrev):
* lisp/progmodes/verilog-mode.el (verilog-tool)
(verilog-string-replace-matches, verilog-preprocess)
(verilog-auto-insert-lisp, verilog-auto-insert-last):
* lisp/textmodes/makeinfo.el (makeinfo-options):
* src/font.c (Ffont_spec):
Fix minor quoting problems in doc strings, e.g., missing quote,
``x'' where `x' was meant, etc.
* lisp/erc/erc-backend.el (erc-process-sentinel-2):
Fix minor quoting problem in other string.
* lisp/leim/quail/ethiopic.el ("ethiopic"):
* lisp/term/tvi970.el (tvi970-set-keypad-mode):
Omit unnecessary quotes.
* lisp/faces.el (set-face-attribute, set-face-underline)
(set-face-inverse-video, x-create-frame-with-faces):
* lisp/gnus/gnus-group.el (gnus-group-nnimap-edit-acl):
* lisp/mail/supercite.el (sc-attribs-%@-addresses)
(sc-attribs-!-addresses, sc-attribs-<>-addresses):
* lisp/net/tramp.el (tramp-methods):
* lisp/recentf.el (recentf-show-file-shortcuts-flag):
* lisp/textmodes/artist.el (artist-ellipse-right-char)
(artist-ellipse-left-char, artist-vaporize-fuzziness)
(artist-spray-chars, artist-mode, artist-replace-string)
(artist-put-pixel, artist-text-see-thru):
* lisp/vc/ediff-util.el (ediff-submit-report):
* lisp/vc/log-edit.el (log-edit-changelog-full-paragraphs):
Use double-quotes rather than TeX markup in doc strings.
* lisp/skeleton.el (skeleton-pair-insert-maybe):
Reword to avoid the need for grave accent and apostrophe.
* lisp/xt-mouse.el (xterm-mouse-tracking-enable-sequence):
Don't use grave and acute accents to quote.
2015-05-19 14:59:15 -07:00
|
|
|
;; Make the "reporter" functionality available for making bug reports about
|
2015-05-25 10:44:51 +02:00
|
|
|
;; the package. A most useful piece of code.
|
2007-10-27 13:57:43 +00:00
|
|
|
|
|
|
|
(autoload 'reporter-submit-bug-report "reporter")
|
|
|
|
|
2010-10-02 15:21:43 +02:00
|
|
|
;;;###tramp-autoload
|
2007-10-27 13:57:43 +00:00
|
|
|
(defun tramp-bug ()
|
|
|
|
"Submit a bug report to the Tramp developers."
|
|
|
|
(interactive)
|
2019-07-15 12:49:42 +02:00
|
|
|
(let ((reporter-prompt-for-summary-p t)
|
|
|
|
;; In rare cases, it could contain the password. So we make it nil.
|
|
|
|
tramp-password-save-function)
|
|
|
|
(reporter-submit-bug-report
|
|
|
|
tramp-bug-report-address ; to-address
|
|
|
|
(format "tramp (%s %s/%s)" ; package name and version
|
|
|
|
tramp-version tramp-repository-branch tramp-repository-version)
|
|
|
|
(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
|
|
|
|
password-cache
|
|
|
|
password-cache-expiry
|
|
|
|
remote-file-name-inhibit-cache
|
|
|
|
connection-local-profile-alist
|
|
|
|
connection-local-criteria-alist
|
|
|
|
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
|
|
|
|
(propertize
|
|
|
|
"\n" 'display "\
|
2007-10-27 13:57:43 +00:00
|
|
|
Enter your bug report in this message, including as much detail
|
|
|
|
as you possibly can about the problem, what you did to cause it
|
|
|
|
and what the local and remote machines are.
|
|
|
|
|
|
|
|
If you can give a simple set of instructions to make this bug
|
|
|
|
happen reliably, please include those. Thank you for helping
|
|
|
|
kill bugs in Tramp.
|
|
|
|
|
2009-06-22 21:06:49 +00:00
|
|
|
Before reproducing the bug, you might apply
|
|
|
|
|
|
|
|
M-x tramp-cleanup-all-connections
|
|
|
|
|
2016-01-24 20:30:39 +00:00
|
|
|
This allows us to investigate from a clean environment. Another
|
2009-06-22 21:06:49 +00:00
|
|
|
useful thing to do is to put
|
2007-10-27 13:57:43 +00:00
|
|
|
|
2010-07-28 12:02:18 +02:00
|
|
|
(setq tramp-verbose 9)
|
2007-10-27 13:57:43 +00:00
|
|
|
|
2012-09-17 13:41:04 +08:00
|
|
|
in your init file and to repeat the bug. Then, include the
|
2007-10-27 13:57:43 +00:00
|
|
|
contents of the *tramp/foo* buffer and the *debug tramp/foo*
|
|
|
|
buffer in your bug report.
|
|
|
|
|
|
|
|
--bug report follows this line--
|
2019-07-15 12:49:42 +02:00
|
|
|
"))))
|
2007-10-27 13:57:43 +00:00
|
|
|
|
|
|
|
(defun tramp-reporter-dump-variable (varsym mailbuf)
|
2010-10-02 15:21:43 +02:00
|
|
|
"Pretty-print the value of the variable in symbol VARSYM."
|
2007-10-27 13:57:43 +00:00
|
|
|
(let* ((reporter-eval-buffer (symbol-value 'reporter-eval-buffer))
|
|
|
|
(val (with-current-buffer reporter-eval-buffer
|
|
|
|
(symbol-value varsym))))
|
|
|
|
|
|
|
|
(if (hash-table-p val)
|
|
|
|
;; Pretty print the cache.
|
|
|
|
(set varsym (read (format "(%s)" (tramp-cache-print val))))
|
2010-10-02 15:21:43 +02:00
|
|
|
;; There are non-7bit characters to be masked.
|
2017-05-08 17:27:50 +02:00
|
|
|
(when (and (stringp val)
|
Rework Tramp wrt string-match-p, looking-at-p, save-match-data
* lisp/net/tramp.el (tramp-find-method, tramp-find-user)
(tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name)
(tramp-completion-make-tramp-file-name, tramp-debug-message)
(tramp-message, tramp-progress-reporter-update)
(tramp-set-completion-function)
(tramp-rfn-eshadow-update-overlay)
(tramp-find-file-name-coding-system-alist)
(tramp-file-name-for-operation)
(tramp-use-absolute-autoload-file-names)
(tramp-get-completion-methods, tramp-get-completion-user-host)
(tramp-handle-directory-files)
(tramp-handle-file-name-case-insensitive-p)
(tramp-handle-file-name-completion, tramp-handle-file-truename)
(tramp-handle-insert-directory, tramp-handle-load)
(tramp-handle-shell-command, tramp-action-yesno)
(tramp-action-yn, tramp-process-actions)
(tramp-mode-string-to-int, tramp-get-local-locale)
(tramp-local-host-p):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info)
(tramp-adb-handle-directory-files-and-attributes)
(tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output)
(tramp-adb-handle-file-name-all-completions)
(tramp-adb-handle-shell-command)
(tramp-adb-handle-start-file-process):
* lisp/net/tramp-archive.el (tramp-archive-dissect-file-name):
* lisp/net/tramp-cache.el (tramp-get-hash-table)
(tramp-flush-directory-properties, tramp-flush-file-function):
* lisp/net/tramp-cmds.el (tramp-reporter-dump-variable)
(tramp-append-tramp-buffers):
* lisp/net/tramp-compat.el (tramp-compat-process-running-p):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
(tramp-gvfs-get-file-attributes)
(tramp-gvfs-handle-file-attributes)
(tramp-gvfs-monitor-process-filter)
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry)
(tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-stat)
(tramp-sh-handle-file-selinux-context)
(tramp-sh-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-dired-compress-file)
(tramp-sh-handle-insert-directory)
(tramp-sh-handle-expand-file-name)
(tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file, tramp-sh-handle-write-region)
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gio-monitor-process-filter)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter)
(tramp-sh-handle-file-system-info, tramp-maybe-send-script)
(tramp-find-executable, tramp-open-shell, tramp-find-shell)
(tramp-open-connection-setup-interactive-shell)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-convert-file-attributes)
(tramp-make-copy-program-file-name, tramp-get-remote-locale)
(tramp-get-test-nt-command, tramp-get-remote-stat)
(tramp-get-inline-coding):
* lisp/net/tramp-smb.el (tramp-smb-handle-directory-files)
(tramp-smb-action-get-acl, tramp-smb-handle-file-attributes)
(tramp-smb-handle-file-name-all-completions)
(tramp-smb-handle-file-system-info)
(tramp-smb-handle-file-writable-p)
(tramp-smb-handle-insert-directory)
(tramp-smb-handle-make-directory)
(tramp-smb-handle-make-directory-internal)
(tramp-smb-handle-start-file-process, tramp-smb-get-localname)
(tramp-smb-read-file-entry): Use `string-match-p' and
`looking-at-p'. Remove superfluous `save-match-data'. Apply
`eval-when-compile' on constant concat data.
* lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p):
Use `string-prefix-p'.
(tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 16:00:05 +01:00
|
|
|
(string-match-p
|
2017-05-08 17:27:50 +02:00
|
|
|
(concat "[^" (bound-and-true-p mm-7bit-chars) "]") val))
|
2007-10-27 13:57:43 +00:00
|
|
|
(with-current-buffer reporter-eval-buffer
|
2015-08-18 14:24:16 +02:00
|
|
|
(set
|
|
|
|
varsym
|
|
|
|
(format
|
|
|
|
"(decode-coding-string (base64-decode-string \"%s\") 'raw-text)"
|
|
|
|
(base64-encode-string (encode-coding-string val 'raw-text)))))))
|
2007-10-27 13:57:43 +00:00
|
|
|
|
|
|
|
;; Dump variable.
|
Remove XEmacs compatibility in Tramp
* doc/misc/tramp.texi: Replace flags by their hard coded name.
Remove unused flags and the enclosed alternative text for XEmacs.
* doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs"
and "xemacs" flags to "unified" and "separate". Remove flags
"emacsgw", "emacsname", "emacsdir", "ftppackagename",
"emacsothername", "emacsotherdir" and "emacsotherfilename".
(trampver):
* lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre".
* lisp/net/tramp.el (bkup-backup-directory-info)
(directory-sep-char, ls-lisp-use-insert-directory-program)
(outline-regexp, tramp-backup-directory-alist)
(tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax)
(tramp-file-name-regexp-unified)
(tramp-file-name-regexp-separate)
(tramp-completion-file-name-regexp-unified)
(tramp-completion-file-name-regexp-separate, tramp-chunksize)
(tramp-get-method-parameter, tramp-find-method, tramp-find-user)
(tramp-debug-message, tramp-progress-reporter-update)
(with-tramp-progress-reporter)
(tramp-rfn-eshadow-setup-minibuffer)
(rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook)
(tramp-rfn-eshadow-update-overlay)
(rfn-eshadow-update-overlay-hook, tramp-default-file-modes)
(tramp-file-name-for-operation)
(tramp-completion-file-name-handler)
(tramp-autoload-file-name-handler, tramp-completion-mode-p)
(tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-handle-dired-uncache, tramp-handle-find-backup-file-name)
(tramp-handle-insert-file-contents, tramp-handle-load)
(tramp-handle-shell-command)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-file-notify-valid-p, tramp-accept-process-output)
(tramp-check-for-regexp, tramp-wait-for-regexp)
(tramp-send-string, tramp-mode-string-to-int)
(tramp-get-local-gid, tramp-check-cached-permissions)
(tramp-get-remote-tmpdir, tramp-make-tramp-temp-file)
(auto-save-file-name-transforms)
(tramp-handle-make-auto-save-file-name, tramp-read-passwd)
(tramp-clear-passwd, tramp-time-diff):
* lisp/net/tramp-adb.el (directory-listing-before-filename-regexp)
(directory-sep-char, tramp-adb-file-name-handler-alist)
(tramp-adb-parse-device-names)
(tramp-adb-handle-expand-file-name)
(tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash)
(tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes)
(tramp-adb-handle-rename-file, tramp-adb-handle-process-file)
(tramp-adb-handle-shell-command)
(tramp-adb-handle-start-file-process, tramp-adb-get-device)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-cache.el (tramp-persistency-file-name)
(tramp-cache-print):
* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections)
(tramp-bug, tramp-reporter-dump-variable)
(tramp-load-report-modules, tramp-append-tramp-buffers):
* lisp/net/tramp-compat.el (tramp-compat-funcall)
(tramp-advice-file-expand-wildcards)
(tramp-compat-temporary-file-directory)
(tramp-compat-make-temp-file, tramp-compat-copy-file)
(tramp-compat-delete-directory, )
(tramp-compat-process-running-p):
* lisp/net/tramp-ftp.el (tramp-methods) <ftp>:
(tramp-default-method-alist, tramp-foreign-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
(tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file)
(tramp-gvfs-handle-file-local-copy)
(tramp-gvfs-handle-file-name-all-completions)
(tramp-gvfs-handle-file-notify-add-watch)
(tramp-gvfs-monitor-file-process-filter)
(tramp-gvfs-handle-file-readable-p)
(tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region)
(tramp-gvfs-file-name, tramp-gvfs-handler-askquestion)
(tramp-gvfs-maybe-open-connection)
(tramp-gvfs-parse-device-names):
* lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel)
(tramp-gw-open-connection, tramp-gw-open-network-stream):
* lisp/net/tramp-sh.el (directory-sep-char)
(tramp-sh-file-name-handler-alist)
(tramp-sh-handle-file-truename)
(tramp-sh-handle-set-visited-file-modtime)
(tramp-sh-handle-verify-visited-file-modtime)
(tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times)
(tramp-sh-handle-file-acl)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-copy-file, tramp-sh-handle-rename-file)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(dired-compress-file-suffixes, dired-remove-file)
(tramp-sh-handle-dired-compress-file)
(tramp-sh-handle-insert-directory)
(tramp-sh-handle-expand-file-name)
(tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy)
(tramp-sh-handle-write-region, tramp-sh-handle-vc-registered)
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter, tramp-maybe-send-script)
(tramp-find-executable)
(tramp-open-connection-setup-interactive-shell)
(tramp-find-inline-encoding, tramp-compute-multi-hops)
(tramp-maybe-open-connection, tramp-convert-file-attributes)
(tramp-get-remote-path, tramp-get-remote-touch):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist)
(tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file)
(tramp-smb-handle-delete-directory)
(tramp-smb-handle-directory-files, tramp-smb-handle-file-acl)
(tramp-smb-handle-make-directory-internal)
(tramp-smb-handle-process-file, tramp-smb-handle-rename-file)
(tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes)
(tramp-smb-handle-write-region, tramp-smb-get-file-entries)
(tramp-smb-get-cifs-capabilities)
(tramp-smb-maybe-open-connection):
* lisp/net/trampver.el (tramp-repository-get-version):
Remove XEmacs compat code.
* lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag)
(reporter-dump-variable): Declare functions.
* lisp/net/tramp.el (tramp-bkup-backup-directory-info)
(tramp-advice-minibuffer-electric-separator)
(tramp-advice-minibuffer-electric-tilde)
(tramp-handle-unhandled-file-name-directory):
* lisp/net/tramp-compat.el (tramp-compat-with-temp-message)
(tramp-compat-font-lock-add-keywords)
(tramp-compat-load, tramp-compat-number-sequence)
(tramp-compat-split-string, tramp-compat-delete-dups):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally):
Remove.
* lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work
recursively.
2016-01-14 14:12:17 +01:00
|
|
|
(reporter-dump-variable varsym mailbuf)
|
2007-10-27 13:57:43 +00:00
|
|
|
|
|
|
|
(unless (hash-table-p val)
|
|
|
|
;; Remove string quotation.
|
|
|
|
(forward-line -1)
|
|
|
|
(when (looking-at
|
2020-07-12 15:02:56 +02:00
|
|
|
(concat "\\(^.*\\)" "\"" ;; \1 "
|
|
|
|
"\\((base64-decode-string \\)" "\\\\" ;; \2 \
|
|
|
|
"\\(\".*\\)" "\\\\" ;; \3 \
|
|
|
|
"\\(\")\\)" "\"$")) ;; \4 "
|
2007-10-27 13:57:43 +00:00
|
|
|
(replace-match "\\1\\2\\3\\4")
|
|
|
|
(beginning-of-line)
|
2010-10-02 15:21:43 +02:00
|
|
|
(insert " ;; Variable encoded due to non-printable characters.\n"))
|
2007-10-27 13:57:43 +00:00
|
|
|
(forward-line 1))
|
|
|
|
|
|
|
|
;; Reset VARSYM to old value.
|
|
|
|
(with-current-buffer reporter-eval-buffer
|
|
|
|
(set varsym val))))
|
|
|
|
|
|
|
|
(defun tramp-load-report-modules ()
|
|
|
|
"Load needed modules for reporting."
|
Remove XEmacs compatibility in Tramp
* doc/misc/tramp.texi: Replace flags by their hard coded name.
Remove unused flags and the enclosed alternative text for XEmacs.
* doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs"
and "xemacs" flags to "unified" and "separate". Remove flags
"emacsgw", "emacsname", "emacsdir", "ftppackagename",
"emacsothername", "emacsotherdir" and "emacsotherfilename".
(trampver):
* lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre".
* lisp/net/tramp.el (bkup-backup-directory-info)
(directory-sep-char, ls-lisp-use-insert-directory-program)
(outline-regexp, tramp-backup-directory-alist)
(tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax)
(tramp-file-name-regexp-unified)
(tramp-file-name-regexp-separate)
(tramp-completion-file-name-regexp-unified)
(tramp-completion-file-name-regexp-separate, tramp-chunksize)
(tramp-get-method-parameter, tramp-find-method, tramp-find-user)
(tramp-debug-message, tramp-progress-reporter-update)
(with-tramp-progress-reporter)
(tramp-rfn-eshadow-setup-minibuffer)
(rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook)
(tramp-rfn-eshadow-update-overlay)
(rfn-eshadow-update-overlay-hook, tramp-default-file-modes)
(tramp-file-name-for-operation)
(tramp-completion-file-name-handler)
(tramp-autoload-file-name-handler, tramp-completion-mode-p)
(tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-handle-dired-uncache, tramp-handle-find-backup-file-name)
(tramp-handle-insert-file-contents, tramp-handle-load)
(tramp-handle-shell-command)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-file-notify-valid-p, tramp-accept-process-output)
(tramp-check-for-regexp, tramp-wait-for-regexp)
(tramp-send-string, tramp-mode-string-to-int)
(tramp-get-local-gid, tramp-check-cached-permissions)
(tramp-get-remote-tmpdir, tramp-make-tramp-temp-file)
(auto-save-file-name-transforms)
(tramp-handle-make-auto-save-file-name, tramp-read-passwd)
(tramp-clear-passwd, tramp-time-diff):
* lisp/net/tramp-adb.el (directory-listing-before-filename-regexp)
(directory-sep-char, tramp-adb-file-name-handler-alist)
(tramp-adb-parse-device-names)
(tramp-adb-handle-expand-file-name)
(tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash)
(tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes)
(tramp-adb-handle-rename-file, tramp-adb-handle-process-file)
(tramp-adb-handle-shell-command)
(tramp-adb-handle-start-file-process, tramp-adb-get-device)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-cache.el (tramp-persistency-file-name)
(tramp-cache-print):
* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections)
(tramp-bug, tramp-reporter-dump-variable)
(tramp-load-report-modules, tramp-append-tramp-buffers):
* lisp/net/tramp-compat.el (tramp-compat-funcall)
(tramp-advice-file-expand-wildcards)
(tramp-compat-temporary-file-directory)
(tramp-compat-make-temp-file, tramp-compat-copy-file)
(tramp-compat-delete-directory, )
(tramp-compat-process-running-p):
* lisp/net/tramp-ftp.el (tramp-methods) <ftp>:
(tramp-default-method-alist, tramp-foreign-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
(tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file)
(tramp-gvfs-handle-file-local-copy)
(tramp-gvfs-handle-file-name-all-completions)
(tramp-gvfs-handle-file-notify-add-watch)
(tramp-gvfs-monitor-file-process-filter)
(tramp-gvfs-handle-file-readable-p)
(tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region)
(tramp-gvfs-file-name, tramp-gvfs-handler-askquestion)
(tramp-gvfs-maybe-open-connection)
(tramp-gvfs-parse-device-names):
* lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel)
(tramp-gw-open-connection, tramp-gw-open-network-stream):
* lisp/net/tramp-sh.el (directory-sep-char)
(tramp-sh-file-name-handler-alist)
(tramp-sh-handle-file-truename)
(tramp-sh-handle-set-visited-file-modtime)
(tramp-sh-handle-verify-visited-file-modtime)
(tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times)
(tramp-sh-handle-file-acl)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-copy-file, tramp-sh-handle-rename-file)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(dired-compress-file-suffixes, dired-remove-file)
(tramp-sh-handle-dired-compress-file)
(tramp-sh-handle-insert-directory)
(tramp-sh-handle-expand-file-name)
(tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy)
(tramp-sh-handle-write-region, tramp-sh-handle-vc-registered)
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter, tramp-maybe-send-script)
(tramp-find-executable)
(tramp-open-connection-setup-interactive-shell)
(tramp-find-inline-encoding, tramp-compute-multi-hops)
(tramp-maybe-open-connection, tramp-convert-file-attributes)
(tramp-get-remote-path, tramp-get-remote-touch):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist)
(tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file)
(tramp-smb-handle-delete-directory)
(tramp-smb-handle-directory-files, tramp-smb-handle-file-acl)
(tramp-smb-handle-make-directory-internal)
(tramp-smb-handle-process-file, tramp-smb-handle-rename-file)
(tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes)
(tramp-smb-handle-write-region, tramp-smb-get-file-entries)
(tramp-smb-get-cifs-capabilities)
(tramp-smb-maybe-open-connection):
* lisp/net/trampver.el (tramp-repository-get-version):
Remove XEmacs compat code.
* lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag)
(reporter-dump-variable): Declare functions.
* lisp/net/tramp.el (tramp-bkup-backup-directory-info)
(tramp-advice-minibuffer-electric-separator)
(tramp-advice-minibuffer-electric-tilde)
(tramp-handle-unhandled-file-name-directory):
* lisp/net/tramp-compat.el (tramp-compat-with-temp-message)
(tramp-compat-font-lock-add-keywords)
(tramp-compat-load, tramp-compat-number-sequence)
(tramp-compat-split-string, tramp-compat-delete-dups):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally):
Remove.
* lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work
recursively.
2016-01-14 14:12:17 +01:00
|
|
|
(message-mode)
|
|
|
|
(mml-mode t))
|
2007-10-27 13:57:43 +00:00
|
|
|
|
|
|
|
(defun tramp-append-tramp-buffers ()
|
|
|
|
"Append Tramp buffers and buffer local variables into the bug report."
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
|
|
|
;; Dump buffer local variables.
|
2013-08-16 14:41:17 +02:00
|
|
|
(insert "\nlocal variables:\n================")
|
2007-10-27 13:57:43 +00:00
|
|
|
(dolist (buffer
|
|
|
|
(delq nil
|
|
|
|
(mapcar
|
2011-05-23 14:57:17 -03:00
|
|
|
(lambda (b)
|
Rework Tramp wrt string-match-p, looking-at-p, save-match-data
* lisp/net/tramp.el (tramp-find-method, tramp-find-user)
(tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name)
(tramp-completion-make-tramp-file-name, tramp-debug-message)
(tramp-message, tramp-progress-reporter-update)
(tramp-set-completion-function)
(tramp-rfn-eshadow-update-overlay)
(tramp-find-file-name-coding-system-alist)
(tramp-file-name-for-operation)
(tramp-use-absolute-autoload-file-names)
(tramp-get-completion-methods, tramp-get-completion-user-host)
(tramp-handle-directory-files)
(tramp-handle-file-name-case-insensitive-p)
(tramp-handle-file-name-completion, tramp-handle-file-truename)
(tramp-handle-insert-directory, tramp-handle-load)
(tramp-handle-shell-command, tramp-action-yesno)
(tramp-action-yn, tramp-process-actions)
(tramp-mode-string-to-int, tramp-get-local-locale)
(tramp-local-host-p):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info)
(tramp-adb-handle-directory-files-and-attributes)
(tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output)
(tramp-adb-handle-file-name-all-completions)
(tramp-adb-handle-shell-command)
(tramp-adb-handle-start-file-process):
* lisp/net/tramp-archive.el (tramp-archive-dissect-file-name):
* lisp/net/tramp-cache.el (tramp-get-hash-table)
(tramp-flush-directory-properties, tramp-flush-file-function):
* lisp/net/tramp-cmds.el (tramp-reporter-dump-variable)
(tramp-append-tramp-buffers):
* lisp/net/tramp-compat.el (tramp-compat-process-running-p):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
(tramp-gvfs-get-file-attributes)
(tramp-gvfs-handle-file-attributes)
(tramp-gvfs-monitor-process-filter)
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry)
(tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-stat)
(tramp-sh-handle-file-selinux-context)
(tramp-sh-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-dired-compress-file)
(tramp-sh-handle-insert-directory)
(tramp-sh-handle-expand-file-name)
(tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file, tramp-sh-handle-write-region)
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gio-monitor-process-filter)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter)
(tramp-sh-handle-file-system-info, tramp-maybe-send-script)
(tramp-find-executable, tramp-open-shell, tramp-find-shell)
(tramp-open-connection-setup-interactive-shell)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-convert-file-attributes)
(tramp-make-copy-program-file-name, tramp-get-remote-locale)
(tramp-get-test-nt-command, tramp-get-remote-stat)
(tramp-get-inline-coding):
* lisp/net/tramp-smb.el (tramp-smb-handle-directory-files)
(tramp-smb-action-get-acl, tramp-smb-handle-file-attributes)
(tramp-smb-handle-file-name-all-completions)
(tramp-smb-handle-file-system-info)
(tramp-smb-handle-file-writable-p)
(tramp-smb-handle-insert-directory)
(tramp-smb-handle-make-directory)
(tramp-smb-handle-make-directory-internal)
(tramp-smb-handle-start-file-process, tramp-smb-get-localname)
(tramp-smb-read-file-entry): Use `string-match-p' and
`looking-at-p'. Remove superfluous `save-match-data'. Apply
`eval-when-compile' on constant concat data.
* lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p):
Use `string-prefix-p'.
(tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 16:00:05 +01:00
|
|
|
(when (string-match-p "\\*tramp/" (buffer-name b)) b))
|
2007-10-27 13:57:43 +00:00
|
|
|
(buffer-list))))
|
|
|
|
(let ((reporter-eval-buffer buffer)
|
|
|
|
(elbuf (get-buffer-create " *tmp-reporter-buffer*")))
|
|
|
|
(with-current-buffer elbuf
|
|
|
|
(emacs-lisp-mode)
|
|
|
|
(erase-buffer)
|
2013-08-16 14:41:17 +02:00
|
|
|
(insert (format "\n;; %s\n(setq-local\n" (buffer-name buffer)))
|
2007-10-27 13:57:43 +00:00
|
|
|
(lisp-indent-line)
|
2013-08-16 14:41:17 +02:00
|
|
|
(dolist
|
|
|
|
(varsym
|
|
|
|
(sort
|
|
|
|
(append
|
|
|
|
(mapcar
|
2019-02-28 10:33:05 +01:00
|
|
|
#'intern
|
2013-08-16 14:41:17 +02:00
|
|
|
(all-completions "tramp-" (buffer-local-variables buffer)))
|
|
|
|
;; Non-tramp variables of interest.
|
2016-11-22 09:20:21 +01:00
|
|
|
'(connection-local-variables-alist default-directory))
|
2019-02-28 10:33:05 +01:00
|
|
|
#'string<))
|
Remove XEmacs compatibility in Tramp
* doc/misc/tramp.texi: Replace flags by their hard coded name.
Remove unused flags and the enclosed alternative text for XEmacs.
* doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs"
and "xemacs" flags to "unified" and "separate". Remove flags
"emacsgw", "emacsname", "emacsdir", "ftppackagename",
"emacsothername", "emacsotherdir" and "emacsotherfilename".
(trampver):
* lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre".
* lisp/net/tramp.el (bkup-backup-directory-info)
(directory-sep-char, ls-lisp-use-insert-directory-program)
(outline-regexp, tramp-backup-directory-alist)
(tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax)
(tramp-file-name-regexp-unified)
(tramp-file-name-regexp-separate)
(tramp-completion-file-name-regexp-unified)
(tramp-completion-file-name-regexp-separate, tramp-chunksize)
(tramp-get-method-parameter, tramp-find-method, tramp-find-user)
(tramp-debug-message, tramp-progress-reporter-update)
(with-tramp-progress-reporter)
(tramp-rfn-eshadow-setup-minibuffer)
(rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook)
(tramp-rfn-eshadow-update-overlay)
(rfn-eshadow-update-overlay-hook, tramp-default-file-modes)
(tramp-file-name-for-operation)
(tramp-completion-file-name-handler)
(tramp-autoload-file-name-handler, tramp-completion-mode-p)
(tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-handle-dired-uncache, tramp-handle-find-backup-file-name)
(tramp-handle-insert-file-contents, tramp-handle-load)
(tramp-handle-shell-command)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-file-notify-valid-p, tramp-accept-process-output)
(tramp-check-for-regexp, tramp-wait-for-regexp)
(tramp-send-string, tramp-mode-string-to-int)
(tramp-get-local-gid, tramp-check-cached-permissions)
(tramp-get-remote-tmpdir, tramp-make-tramp-temp-file)
(auto-save-file-name-transforms)
(tramp-handle-make-auto-save-file-name, tramp-read-passwd)
(tramp-clear-passwd, tramp-time-diff):
* lisp/net/tramp-adb.el (directory-listing-before-filename-regexp)
(directory-sep-char, tramp-adb-file-name-handler-alist)
(tramp-adb-parse-device-names)
(tramp-adb-handle-expand-file-name)
(tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash)
(tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes)
(tramp-adb-handle-rename-file, tramp-adb-handle-process-file)
(tramp-adb-handle-shell-command)
(tramp-adb-handle-start-file-process, tramp-adb-get-device)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-cache.el (tramp-persistency-file-name)
(tramp-cache-print):
* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections)
(tramp-bug, tramp-reporter-dump-variable)
(tramp-load-report-modules, tramp-append-tramp-buffers):
* lisp/net/tramp-compat.el (tramp-compat-funcall)
(tramp-advice-file-expand-wildcards)
(tramp-compat-temporary-file-directory)
(tramp-compat-make-temp-file, tramp-compat-copy-file)
(tramp-compat-delete-directory, )
(tramp-compat-process-running-p):
* lisp/net/tramp-ftp.el (tramp-methods) <ftp>:
(tramp-default-method-alist, tramp-foreign-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
(tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file)
(tramp-gvfs-handle-file-local-copy)
(tramp-gvfs-handle-file-name-all-completions)
(tramp-gvfs-handle-file-notify-add-watch)
(tramp-gvfs-monitor-file-process-filter)
(tramp-gvfs-handle-file-readable-p)
(tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region)
(tramp-gvfs-file-name, tramp-gvfs-handler-askquestion)
(tramp-gvfs-maybe-open-connection)
(tramp-gvfs-parse-device-names):
* lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel)
(tramp-gw-open-connection, tramp-gw-open-network-stream):
* lisp/net/tramp-sh.el (directory-sep-char)
(tramp-sh-file-name-handler-alist)
(tramp-sh-handle-file-truename)
(tramp-sh-handle-set-visited-file-modtime)
(tramp-sh-handle-verify-visited-file-modtime)
(tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times)
(tramp-sh-handle-file-acl)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-copy-file, tramp-sh-handle-rename-file)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(dired-compress-file-suffixes, dired-remove-file)
(tramp-sh-handle-dired-compress-file)
(tramp-sh-handle-insert-directory)
(tramp-sh-handle-expand-file-name)
(tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy)
(tramp-sh-handle-write-region, tramp-sh-handle-vc-registered)
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter, tramp-maybe-send-script)
(tramp-find-executable)
(tramp-open-connection-setup-interactive-shell)
(tramp-find-inline-encoding, tramp-compute-multi-hops)
(tramp-maybe-open-connection, tramp-convert-file-attributes)
(tramp-get-remote-path, tramp-get-remote-touch):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist)
(tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file)
(tramp-smb-handle-delete-directory)
(tramp-smb-handle-directory-files, tramp-smb-handle-file-acl)
(tramp-smb-handle-make-directory-internal)
(tramp-smb-handle-process-file, tramp-smb-handle-rename-file)
(tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes)
(tramp-smb-handle-write-region, tramp-smb-get-file-entries)
(tramp-smb-get-cifs-capabilities)
(tramp-smb-maybe-open-connection):
* lisp/net/trampver.el (tramp-repository-get-version):
Remove XEmacs compat code.
* lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag)
(reporter-dump-variable): Declare functions.
* lisp/net/tramp.el (tramp-bkup-backup-directory-info)
(tramp-advice-minibuffer-electric-separator)
(tramp-advice-minibuffer-electric-tilde)
(tramp-handle-unhandled-file-name-directory):
* lisp/net/tramp-compat.el (tramp-compat-with-temp-message)
(tramp-compat-font-lock-add-keywords)
(tramp-compat-load, tramp-compat-number-sequence)
(tramp-compat-split-string, tramp-compat-delete-dups):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally):
Remove.
* lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work
recursively.
2016-01-14 14:12:17 +01:00
|
|
|
(reporter-dump-variable varsym elbuf))
|
2007-10-27 13:57:43 +00:00
|
|
|
(lisp-indent-line)
|
|
|
|
(insert ")\n"))
|
|
|
|
(insert-buffer-substring elbuf)))
|
|
|
|
|
2011-02-28 11:58:59 +01:00
|
|
|
;; Dump load-path shadows.
|
|
|
|
(insert "\nload-path shadows:\n==================\n")
|
|
|
|
(ignore-errors
|
2012-07-05 08:57:57 +02:00
|
|
|
(mapc
|
Rework Tramp wrt string-match-p, looking-at-p, save-match-data
* lisp/net/tramp.el (tramp-find-method, tramp-find-user)
(tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name)
(tramp-completion-make-tramp-file-name, tramp-debug-message)
(tramp-message, tramp-progress-reporter-update)
(tramp-set-completion-function)
(tramp-rfn-eshadow-update-overlay)
(tramp-find-file-name-coding-system-alist)
(tramp-file-name-for-operation)
(tramp-use-absolute-autoload-file-names)
(tramp-get-completion-methods, tramp-get-completion-user-host)
(tramp-handle-directory-files)
(tramp-handle-file-name-case-insensitive-p)
(tramp-handle-file-name-completion, tramp-handle-file-truename)
(tramp-handle-insert-directory, tramp-handle-load)
(tramp-handle-shell-command, tramp-action-yesno)
(tramp-action-yn, tramp-process-actions)
(tramp-mode-string-to-int, tramp-get-local-locale)
(tramp-local-host-p):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info)
(tramp-adb-handle-directory-files-and-attributes)
(tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output)
(tramp-adb-handle-file-name-all-completions)
(tramp-adb-handle-shell-command)
(tramp-adb-handle-start-file-process):
* lisp/net/tramp-archive.el (tramp-archive-dissect-file-name):
* lisp/net/tramp-cache.el (tramp-get-hash-table)
(tramp-flush-directory-properties, tramp-flush-file-function):
* lisp/net/tramp-cmds.el (tramp-reporter-dump-variable)
(tramp-append-tramp-buffers):
* lisp/net/tramp-compat.el (tramp-compat-process-running-p):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
(tramp-gvfs-get-file-attributes)
(tramp-gvfs-handle-file-attributes)
(tramp-gvfs-monitor-process-filter)
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry)
(tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-stat)
(tramp-sh-handle-file-selinux-context)
(tramp-sh-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-dired-compress-file)
(tramp-sh-handle-insert-directory)
(tramp-sh-handle-expand-file-name)
(tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file, tramp-sh-handle-write-region)
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gio-monitor-process-filter)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter)
(tramp-sh-handle-file-system-info, tramp-maybe-send-script)
(tramp-find-executable, tramp-open-shell, tramp-find-shell)
(tramp-open-connection-setup-interactive-shell)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-convert-file-attributes)
(tramp-make-copy-program-file-name, tramp-get-remote-locale)
(tramp-get-test-nt-command, tramp-get-remote-stat)
(tramp-get-inline-coding):
* lisp/net/tramp-smb.el (tramp-smb-handle-directory-files)
(tramp-smb-action-get-acl, tramp-smb-handle-file-attributes)
(tramp-smb-handle-file-name-all-completions)
(tramp-smb-handle-file-system-info)
(tramp-smb-handle-file-writable-p)
(tramp-smb-handle-insert-directory)
(tramp-smb-handle-make-directory)
(tramp-smb-handle-make-directory-internal)
(tramp-smb-handle-start-file-process, tramp-smb-get-localname)
(tramp-smb-read-file-entry): Use `string-match-p' and
`looking-at-p'. Remove superfluous `save-match-data'. Apply
`eval-when-compile' on constant concat data.
* lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p):
Use `string-prefix-p'.
(tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 16:00:05 +01:00
|
|
|
(lambda (x) (when (string-match-p "tramp" x) (insert x "\n")))
|
Remove XEmacs compatibility in Tramp
* doc/misc/tramp.texi: Replace flags by their hard coded name.
Remove unused flags and the enclosed alternative text for XEmacs.
* doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs"
and "xemacs" flags to "unified" and "separate". Remove flags
"emacsgw", "emacsname", "emacsdir", "ftppackagename",
"emacsothername", "emacsotherdir" and "emacsotherfilename".
(trampver):
* lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre".
* lisp/net/tramp.el (bkup-backup-directory-info)
(directory-sep-char, ls-lisp-use-insert-directory-program)
(outline-regexp, tramp-backup-directory-alist)
(tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax)
(tramp-file-name-regexp-unified)
(tramp-file-name-regexp-separate)
(tramp-completion-file-name-regexp-unified)
(tramp-completion-file-name-regexp-separate, tramp-chunksize)
(tramp-get-method-parameter, tramp-find-method, tramp-find-user)
(tramp-debug-message, tramp-progress-reporter-update)
(with-tramp-progress-reporter)
(tramp-rfn-eshadow-setup-minibuffer)
(rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook)
(tramp-rfn-eshadow-update-overlay)
(rfn-eshadow-update-overlay-hook, tramp-default-file-modes)
(tramp-file-name-for-operation)
(tramp-completion-file-name-handler)
(tramp-autoload-file-name-handler, tramp-completion-mode-p)
(tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-handle-dired-uncache, tramp-handle-find-backup-file-name)
(tramp-handle-insert-file-contents, tramp-handle-load)
(tramp-handle-shell-command)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-file-notify-valid-p, tramp-accept-process-output)
(tramp-check-for-regexp, tramp-wait-for-regexp)
(tramp-send-string, tramp-mode-string-to-int)
(tramp-get-local-gid, tramp-check-cached-permissions)
(tramp-get-remote-tmpdir, tramp-make-tramp-temp-file)
(auto-save-file-name-transforms)
(tramp-handle-make-auto-save-file-name, tramp-read-passwd)
(tramp-clear-passwd, tramp-time-diff):
* lisp/net/tramp-adb.el (directory-listing-before-filename-regexp)
(directory-sep-char, tramp-adb-file-name-handler-alist)
(tramp-adb-parse-device-names)
(tramp-adb-handle-expand-file-name)
(tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash)
(tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes)
(tramp-adb-handle-rename-file, tramp-adb-handle-process-file)
(tramp-adb-handle-shell-command)
(tramp-adb-handle-start-file-process, tramp-adb-get-device)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-cache.el (tramp-persistency-file-name)
(tramp-cache-print):
* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections)
(tramp-bug, tramp-reporter-dump-variable)
(tramp-load-report-modules, tramp-append-tramp-buffers):
* lisp/net/tramp-compat.el (tramp-compat-funcall)
(tramp-advice-file-expand-wildcards)
(tramp-compat-temporary-file-directory)
(tramp-compat-make-temp-file, tramp-compat-copy-file)
(tramp-compat-delete-directory, )
(tramp-compat-process-running-p):
* lisp/net/tramp-ftp.el (tramp-methods) <ftp>:
(tramp-default-method-alist, tramp-foreign-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
(tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file)
(tramp-gvfs-handle-file-local-copy)
(tramp-gvfs-handle-file-name-all-completions)
(tramp-gvfs-handle-file-notify-add-watch)
(tramp-gvfs-monitor-file-process-filter)
(tramp-gvfs-handle-file-readable-p)
(tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region)
(tramp-gvfs-file-name, tramp-gvfs-handler-askquestion)
(tramp-gvfs-maybe-open-connection)
(tramp-gvfs-parse-device-names):
* lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel)
(tramp-gw-open-connection, tramp-gw-open-network-stream):
* lisp/net/tramp-sh.el (directory-sep-char)
(tramp-sh-file-name-handler-alist)
(tramp-sh-handle-file-truename)
(tramp-sh-handle-set-visited-file-modtime)
(tramp-sh-handle-verify-visited-file-modtime)
(tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times)
(tramp-sh-handle-file-acl)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-copy-file, tramp-sh-handle-rename-file)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(dired-compress-file-suffixes, dired-remove-file)
(tramp-sh-handle-dired-compress-file)
(tramp-sh-handle-insert-directory)
(tramp-sh-handle-expand-file-name)
(tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy)
(tramp-sh-handle-write-region, tramp-sh-handle-vc-registered)
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter, tramp-maybe-send-script)
(tramp-find-executable)
(tramp-open-connection-setup-interactive-shell)
(tramp-find-inline-encoding, tramp-compute-multi-hops)
(tramp-maybe-open-connection, tramp-convert-file-attributes)
(tramp-get-remote-path, tramp-get-remote-touch):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist)
(tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file)
(tramp-smb-handle-delete-directory)
(tramp-smb-handle-directory-files, tramp-smb-handle-file-acl)
(tramp-smb-handle-make-directory-internal)
(tramp-smb-handle-process-file, tramp-smb-handle-rename-file)
(tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes)
(tramp-smb-handle-write-region, tramp-smb-get-file-entries)
(tramp-smb-get-cifs-capabilities)
(tramp-smb-maybe-open-connection):
* lisp/net/trampver.el (tramp-repository-get-version):
Remove XEmacs compat code.
* lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag)
(reporter-dump-variable): Declare functions.
* lisp/net/tramp.el (tramp-bkup-backup-directory-info)
(tramp-advice-minibuffer-electric-separator)
(tramp-advice-minibuffer-electric-tilde)
(tramp-handle-unhandled-file-name-directory):
* lisp/net/tramp-compat.el (tramp-compat-with-temp-message)
(tramp-compat-font-lock-add-keywords)
(tramp-compat-load, tramp-compat-number-sequence)
(tramp-compat-split-string, tramp-compat-delete-dups):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally):
Remove.
* lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work
recursively.
2016-01-14 14:12:17 +01:00
|
|
|
(split-string (list-load-path-shadows t) "\n")))
|
2011-02-28 11:58:59 +01:00
|
|
|
|
2007-10-27 13:57:43 +00:00
|
|
|
;; Append buffers only when we are in message mode.
|
|
|
|
(when (and
|
|
|
|
(eq major-mode 'message-mode)
|
2017-05-08 17:27:50 +02:00
|
|
|
(bound-and-true-p mml-mode))
|
2007-10-27 13:57:43 +00:00
|
|
|
|
|
|
|
(let ((tramp-buf-regexp "\\*\\(debug \\)?tramp/")
|
Remove XEmacs compatibility in Tramp
* doc/misc/tramp.texi: Replace flags by their hard coded name.
Remove unused flags and the enclosed alternative text for XEmacs.
* doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs"
and "xemacs" flags to "unified" and "separate". Remove flags
"emacsgw", "emacsname", "emacsdir", "ftppackagename",
"emacsothername", "emacsotherdir" and "emacsotherfilename".
(trampver):
* lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre".
* lisp/net/tramp.el (bkup-backup-directory-info)
(directory-sep-char, ls-lisp-use-insert-directory-program)
(outline-regexp, tramp-backup-directory-alist)
(tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax)
(tramp-file-name-regexp-unified)
(tramp-file-name-regexp-separate)
(tramp-completion-file-name-regexp-unified)
(tramp-completion-file-name-regexp-separate, tramp-chunksize)
(tramp-get-method-parameter, tramp-find-method, tramp-find-user)
(tramp-debug-message, tramp-progress-reporter-update)
(with-tramp-progress-reporter)
(tramp-rfn-eshadow-setup-minibuffer)
(rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook)
(tramp-rfn-eshadow-update-overlay)
(rfn-eshadow-update-overlay-hook, tramp-default-file-modes)
(tramp-file-name-for-operation)
(tramp-completion-file-name-handler)
(tramp-autoload-file-name-handler, tramp-completion-mode-p)
(tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-handle-dired-uncache, tramp-handle-find-backup-file-name)
(tramp-handle-insert-file-contents, tramp-handle-load)
(tramp-handle-shell-command)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-file-notify-valid-p, tramp-accept-process-output)
(tramp-check-for-regexp, tramp-wait-for-regexp)
(tramp-send-string, tramp-mode-string-to-int)
(tramp-get-local-gid, tramp-check-cached-permissions)
(tramp-get-remote-tmpdir, tramp-make-tramp-temp-file)
(auto-save-file-name-transforms)
(tramp-handle-make-auto-save-file-name, tramp-read-passwd)
(tramp-clear-passwd, tramp-time-diff):
* lisp/net/tramp-adb.el (directory-listing-before-filename-regexp)
(directory-sep-char, tramp-adb-file-name-handler-alist)
(tramp-adb-parse-device-names)
(tramp-adb-handle-expand-file-name)
(tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash)
(tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes)
(tramp-adb-handle-rename-file, tramp-adb-handle-process-file)
(tramp-adb-handle-shell-command)
(tramp-adb-handle-start-file-process, tramp-adb-get-device)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-cache.el (tramp-persistency-file-name)
(tramp-cache-print):
* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections)
(tramp-bug, tramp-reporter-dump-variable)
(tramp-load-report-modules, tramp-append-tramp-buffers):
* lisp/net/tramp-compat.el (tramp-compat-funcall)
(tramp-advice-file-expand-wildcards)
(tramp-compat-temporary-file-directory)
(tramp-compat-make-temp-file, tramp-compat-copy-file)
(tramp-compat-delete-directory, )
(tramp-compat-process-running-p):
* lisp/net/tramp-ftp.el (tramp-methods) <ftp>:
(tramp-default-method-alist, tramp-foreign-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
(tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file)
(tramp-gvfs-handle-file-local-copy)
(tramp-gvfs-handle-file-name-all-completions)
(tramp-gvfs-handle-file-notify-add-watch)
(tramp-gvfs-monitor-file-process-filter)
(tramp-gvfs-handle-file-readable-p)
(tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region)
(tramp-gvfs-file-name, tramp-gvfs-handler-askquestion)
(tramp-gvfs-maybe-open-connection)
(tramp-gvfs-parse-device-names):
* lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel)
(tramp-gw-open-connection, tramp-gw-open-network-stream):
* lisp/net/tramp-sh.el (directory-sep-char)
(tramp-sh-file-name-handler-alist)
(tramp-sh-handle-file-truename)
(tramp-sh-handle-set-visited-file-modtime)
(tramp-sh-handle-verify-visited-file-modtime)
(tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times)
(tramp-sh-handle-file-acl)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-copy-file, tramp-sh-handle-rename-file)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(dired-compress-file-suffixes, dired-remove-file)
(tramp-sh-handle-dired-compress-file)
(tramp-sh-handle-insert-directory)
(tramp-sh-handle-expand-file-name)
(tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy)
(tramp-sh-handle-write-region, tramp-sh-handle-vc-registered)
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter, tramp-maybe-send-script)
(tramp-find-executable)
(tramp-open-connection-setup-interactive-shell)
(tramp-find-inline-encoding, tramp-compute-multi-hops)
(tramp-maybe-open-connection, tramp-convert-file-attributes)
(tramp-get-remote-path, tramp-get-remote-touch):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist)
(tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file)
(tramp-smb-handle-delete-directory)
(tramp-smb-handle-directory-files, tramp-smb-handle-file-acl)
(tramp-smb-handle-make-directory-internal)
(tramp-smb-handle-process-file, tramp-smb-handle-rename-file)
(tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes)
(tramp-smb-handle-write-region, tramp-smb-get-file-entries)
(tramp-smb-get-cifs-capabilities)
(tramp-smb-maybe-open-connection):
* lisp/net/trampver.el (tramp-repository-get-version):
Remove XEmacs compat code.
* lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag)
(reporter-dump-variable): Declare functions.
* lisp/net/tramp.el (tramp-bkup-backup-directory-info)
(tramp-advice-minibuffer-electric-separator)
(tramp-advice-minibuffer-electric-tilde)
(tramp-handle-unhandled-file-name-directory):
* lisp/net/tramp-compat.el (tramp-compat-with-temp-message)
(tramp-compat-font-lock-add-keywords)
(tramp-compat-load, tramp-compat-number-sequence)
(tramp-compat-split-string, tramp-compat-delete-dups):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally):
Remove.
* lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work
recursively.
2016-01-14 14:12:17 +01:00
|
|
|
(buffer-list (tramp-list-tramp-buffers))
|
2007-10-27 13:57:43 +00:00
|
|
|
(curbuf (current-buffer)))
|
|
|
|
|
|
|
|
;; There is at least one Tramp buffer.
|
|
|
|
(when buffer-list
|
2011-07-13 21:40:30 -04:00
|
|
|
(switch-to-buffer (list-buffers-noselect nil))
|
2007-10-27 13:57:43 +00:00
|
|
|
(delete-other-windows)
|
|
|
|
(setq buffer-read-only nil)
|
|
|
|
(goto-char (point-min))
|
|
|
|
(while (not (eobp))
|
2010-11-13 11:42:32 +01:00
|
|
|
(if (re-search-forward tramp-buf-regexp (point-at-eol) t)
|
2007-10-27 13:57:43 +00:00
|
|
|
(forward-line 1)
|
|
|
|
(forward-line 0)
|
|
|
|
(let ((start (point)))
|
|
|
|
(forward-line 1)
|
|
|
|
(kill-region start (point)))))
|
|
|
|
(insert "
|
|
|
|
The buffer(s) above will be appended to this message. If you
|
|
|
|
don't want to append a buffer because it contains sensitive data,
|
|
|
|
or because the buffer is too large, you should delete the
|
|
|
|
respective buffer. The buffer(s) will contain user and host
|
|
|
|
names. Passwords will never be included there.")
|
|
|
|
|
|
|
|
(when (>= tramp-verbose 6)
|
|
|
|
(insert "\n\n")
|
|
|
|
(let ((start (point)))
|
|
|
|
(insert "\
|
|
|
|
Please note that you have set `tramp-verbose' to a value of at
|
|
|
|
least 6. Therefore, the contents of files might be included in
|
|
|
|
the debug buffer(s).")
|
2016-05-31 20:00:21 +02:00
|
|
|
(add-text-properties start (point) '(face italic))))
|
2007-10-27 13:57:43 +00:00
|
|
|
|
|
|
|
(set-buffer-modified-p nil)
|
|
|
|
(setq buffer-read-only t)
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
2019-07-15 12:49:42 +02:00
|
|
|
(when (y-or-n-p "Do you want to append the buffer(s)? ")
|
|
|
|
;; OK, let's send. First we delete the buffer list.
|
|
|
|
(kill-buffer nil)
|
|
|
|
(switch-to-buffer curbuf)
|
|
|
|
(goto-char (point-max))
|
|
|
|
(insert (propertize "\n" 'display "\n\
|
2007-10-27 13:57:43 +00:00
|
|
|
This is a special notion of the `gnus/message' package. If you
|
|
|
|
use another mail agent (by copying the contents of this buffer)
|
2013-01-22 09:49:03 +01:00
|
|
|
please ensure that the buffers are attached to your email.\n\n"))
|
2019-07-15 12:49:42 +02:00
|
|
|
(dolist (buffer buffer-list)
|
|
|
|
(mml-insert-empty-tag
|
|
|
|
'part 'type "text/plain"
|
|
|
|
'encoding "base64" 'disposition "attachment" 'buffer buffer
|
|
|
|
'description buffer))
|
|
|
|
(set-buffer-modified-p nil))))))
|
2007-10-27 13:57:43 +00:00
|
|
|
|
2019-02-28 10:33:05 +01:00
|
|
|
(defalias 'tramp-submit-bug #'tramp-bug)
|
2007-10-27 13:57:43 +00:00
|
|
|
|
Migrate to Tramp 2.2. Rearrange load dependencies.
(Bug#1529, Bug#5448, Bug#5705)
* Makefile.in (TRAMP_DIR, TRAMP_SRC): New variables.
($(TRAMP_DIR)/tramp-loaddefs.el): New target.
(LOADDEFS): Add $(lisp)/net/tramp-loaddefs.el.
* net/tramp.el (top): Remove all other tramp-* loads except
tramp-compat.el. Remove all changes to tramp-unload-hook for
other tramp-* packages. Rearrange defun order. Change calls of
`tramp-compat-call-process', `tramp-compat-decimal-to-octal',
`tramp-compat-octal-to-decimal' to new function names.
(tramp-terminal-type, tramp-initial-end-of-output)
(tramp-methods, tramp-foreign-file-name-handler-alist)
(tramp-tramp-file-p, tramp-completion-mode-p)
(tramp-send-command-and-check, tramp-get-remote-path)
(tramp-get-remote-tmpdir, tramp-get-remote-ln)
(tramp-shell-quote-argument): Set tramp-autoload cookie.
(with-file-property, with-connection-property): Move to
tramp-cache.el.
(tramp-local-call-process, tramp-decimal-to-octal)
(tramp-octal-to-decimal): Move to tramp-compat.el.
(tramp-handle-shell-command): Do not require 'shell.
(tramp-compute-multi-hops): No special handling for tramp-gw-*
symbols.
(tramp-unload-tramp): Do not call `tramp-unload-file-name-handlers'.
* net/tramp-cache.el (top): Require 'tramp. Add to
`tramp-unload-hook'.
(tramp-cache-data, tramp-get-file-property)
(tramp-set-file-property, tramp-flush-file-property)
(tramp-flush-directory-property, tramp-get-connection-property)
(tramp-set-connection-property, tramp-flush-connection-property)
(tramp-cache-print, tramp-list-connections): Set tramp-autoload
cookie.
(with-file-property, with-connection-property): New defuns, moved
from tramp.el.
(tramp-flush-file-function): Use `with-parsed-tramp-file-name'
macro.
* net/tramp-cmds.el (top): Add to `tramp-unload-hook'.
(tramp-version): Set tramp-autoload cookie.
* net/tramp-compat.el (top): Require 'tramp-loaddefs. Remove all
changes to tramp-unload-hook for other tramp-* packages. Add to
`tramp-unload-hook'.
(tramp-compat-decimal-to-octal, tramp-compat-octal-to-decimal)
(tramp-compat-call-process): New defuns, moved from tramp.el.
* net/tramp-fish.el (top) Require just 'tramp. Add objects to
`tramp-methods' and `tramp-foreign-file-name-handler-alist'. Add
to `tramp-unload-hook'. Change call of
`tramp-compat-decimal-to-octal' to new function name.
(tramp-fish-method): Make it a defconst.
(tramp-fish-file-name-p): Make it a defsubst.
(tramp-fish-method, tramp-fish-file-name-handler)
(tramp-fish-file-name-p): Set tramp-autoload cookie.
* net/tramp-ftp.el (top) Add objects to `tramp-methods' and
`tramp-foreign-file-name-handler-alist'. Add to
`tramp-unload-hook'.
(tramp-ftp-method): Make it a defconst.
(tramp-ftp-file-name-p): Make it a defsubst.
(tramp-ftp-method, tramp-ftp-file-name-handler)
(tramp-ftp-file-name-p): Set tramp-autoload cookie.
* net/tramp-gvfs.el (top) Add objects to `tramp-methods' and
`tramp-foreign-file-name-handler-alist'. Add to
`tramp-unload-hook'. Change checks, whether package can be
loaded.
(tramp-gvfs-file-name-p): Make it a defsubst.
(tramp-gvfs-methods, tramp-gvfs-file-name-handler)
(tramp-gvfs-file-name-p): Set tramp-autoload cookie.
(tramp-gvfs-handle-file-directory-p): New defun.
(tramp-gvfs-file-name-handler-alist): Use it.
* net/tramp-gw.el (top) Add objects to `tramp-methods' and
`tramp-foreign-file-name-handler-alist'. Add to
`tramp-unload-hook'.
(tramp-gw-tunnel-method, tramp-gw-default-tunnel-port)
(tramp-gw-socks-method, tramp-gw-default-socks-port): Make it a
defconst.
(tramp-gw-tunnel-method, tramp-gw-socks-method)
(tramp-gw-open-connection): Set tramp-autoload cookie.
* net/tramp-imap.el (top) Require just 'tramp. Add objects to
`tramp-methods' and `tramp-foreign-file-name-handler-alist'. Add
to `tramp-unload-hook'. Change checks, whether package can be
loaded.
(tramp-imap-file-name-p): Make it a defsubst.
(tramp-imap-method, tramp-imaps-method)
(tramp-imap-file-name-handler)
(tramp-imap-file-name-p): Set tramp-autoload cookie.
* net/tramp-smb.el (top) Require just 'tramp. Add objects to
`tramp-methods' and `tramp-foreign-file-name-handler-alist'. Add
to `tramp-unload-hook'. Change checks, whether package can be
loaded. Change call of `tramp-compat-decimal-to-octal' to new
function name.
(tramp-smb-tunnel-method): Make it a defconst.
(tramp-smb-file-name-p): Make it a defsubst.
(tramp-smb-method, tramp-smb-file-name-handler)
(tramp-smb-file-name-p): Set tramp-autoload cookie.
* net/tramp-uu.el (top) Add to `tramp-unload-hook'.
(tramp-uuencode-region): Set tramp-autoload cookie.
* net/trampver.el (top) Add to `tramp-unload-hook'.
(tramp-version, tramp-bug-report-address): Set tramp-autoload
cookie. Update release number.
2010-09-08 16:42:54 +02:00
|
|
|
(add-hook 'tramp-unload-hook
|
|
|
|
(lambda () (unload-feature 'tramp-cmds 'force)))
|
|
|
|
|
2007-10-21 14:02:38 +00:00
|
|
|
(provide 'tramp-cmds)
|
|
|
|
|
|
|
|
;;; TODO:
|
|
|
|
|
|
|
|
;; * Clean up unused *tramp/foo* buffers after a while. (Pete Forman)
|
2016-09-15 09:24:07 +02:00
|
|
|
;;
|
2007-10-21 14:02:38 +00:00
|
|
|
;; * Let the user edit the connection properties interactively.
|
|
|
|
;; Something like `gnus-server-edit-server' in Gnus' *Server* buffer.
|
|
|
|
|
|
|
|
;;; tramp-cmds.el ends here
|