mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Add renaming of remote buffer file names to Tramp
* doc/misc/tramp.texi (Default User): Fix typo. (Cleanup remote connections): Adapt arguments of `tramp-cleanup-connection'. (Renaming remote files): New node. (Frequently Asked Questions): New item "How to save files when a remote host isn't reachable anymore?". * etc/NEWS: Add `tramp-rename-files' and `tramp-rename-these-files'. * lisp/net/tramp-cmds.el (tramp-default-rename-alist) (tramp-confirm-rename-file-names): New defcustoms. (tramp-rename-read-file-name-dir) (tramp-rename-read-file-name-init): New defsubsts. (tramp-default-rename-file, tramp-rename-files) (tramp-rename-these-files): New defuns. * lisp/net/tramp-integration.el (ido, ivy): Integrate with them.
This commit is contained in:
parent
5c5c1b5593
commit
035931777b
4 changed files with 416 additions and 12 deletions
|
|
@ -36,6 +36,8 @@
|
|||
(declare-function tramp-file-name-equal-p "tramp")
|
||||
(declare-function tramp-tramp-file-p "tramp")
|
||||
(defvar eshell-path-env)
|
||||
(defvar ido-read-file-name-non-ido)
|
||||
(defvar ivy-completing-read-handlers-alist)
|
||||
(defvar recentf-exclude)
|
||||
(defvar tramp-current-connection)
|
||||
(defvar tramp-postfix-host-format)
|
||||
|
|
@ -170,6 +172,20 @@ NAME must be equal to `tramp-current-connection'."
|
|||
(remove-hook 'tramp-cleanup-all-connections-hook
|
||||
#'tramp-recentf-cleanup-all))))
|
||||
|
||||
;;; Integration of ido.el:
|
||||
|
||||
(with-eval-after-load 'ido
|
||||
(add-to-list 'ido-read-file-name-non-ido 'tramp-rename-files)
|
||||
(add-to-list 'ido-read-file-name-non-ido 'tramp-these-rename-files))
|
||||
|
||||
;;; Integration of ivy.el:
|
||||
|
||||
(with-eval-after-load 'ivy
|
||||
(add-to-list 'ivy-completing-read-handlers-alist
|
||||
'(tramp-rename-files . completing-read-default))
|
||||
(add-to-list 'ivy-completing-read-handlers-alist
|
||||
'(tramp-these-rename-files . completing-read-default)))
|
||||
|
||||
;;; Default connection-local variables for Tramp:
|
||||
|
||||
(defconst tramp-connection-local-default-profile
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue