]> git.eshelyaron.com Git - emacs.git/commit
Rework `abbreviate-file-name' in Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 7 Mar 2022 12:42:30 +0000 (13:42 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 7 Mar 2022 12:42:30 +0000 (13:42 +0100)
commit3e4d4f472d3960a7d18dad76b8d54a66bc5d9f6c
tree2ab72f65840da328ea319bed95c3cfe44e99745e
parentc7d3ebc7fd82199bf3f943c362d835fa0f0a1be6
Rework `abbreviate-file-name' in Tramp

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Add 'tramp-get-home-directory'.

* lisp/net/tramp-compat.el (tramp-file-name-handler): Declare.
(tramp-compat-exec-path): Use it.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Add 'tramp-get-home-directory'.
(tramp-gvfs-handle-expand-file-name): Rewrite tilde handling.
(tramp-gvfs-handle-get-home-directory): New defun.

* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
Add 'tramp-get-home-directory'.
(tramp-sh-handle-get-home-directory): New defun.
(tramp-sh-handle-expand-file-name): Rewrite tilde handling.

* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add 'tramp-get-home-directory'.
(tramp-smb-handle-expand-file-name): Rewrite tilde handling.
(tramp-smb-handle-get-home-directory): New defun.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add 'tramp-get-home-directory'.
(tramp-sudoedit-handle-expand-file-name): Rewrite tilde handling.
(tramp-sudoedit-handle-get-home-directory): New defun.

* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `tramp-get-home-directory'.
(tramp-get-home-directory): New defun.
(tramp-handle-abbreviate-file-name): Use it.
(tramp-set-file-uid-gid, tramp-get-remote-uid)
(tramp-get-remote-gid): Use `tramp-file-name-handler'.
(tramp-get-remote-null-device): Do not check for null VEC, it
doesn't happen anymore.

* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-relative):
Reorder checks.
(tramp-test07-abbreviate-file-name):
(tramp--test-ange-ftp-p): Adapt tests.
13 files changed:
lisp/net/tramp-adb.el
lisp/net/tramp-archive.el
lisp/net/tramp-compat.el
lisp/net/tramp-crypt.el
lisp/net/tramp-gvfs.el
lisp/net/tramp-integration.el
lisp/net/tramp-rclone.el
lisp/net/tramp-sh.el
lisp/net/tramp-smb.el
lisp/net/tramp-sshfs.el
lisp/net/tramp-sudoedit.el
lisp/net/tramp.el
test/lisp/net/tramp-tests.el