diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2021-07-08 07:48:40 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2021-07-08 07:48:40 +0200 |
commit | 6d580b00e48e567ac92645e2d120769475d196ad (patch) | |
tree | c7bb4944804b1ec61f79325d50562955e402752b /lisp/net/tramp-sh.el | |
parent | 7d6d14023a4ad7907c6e10ebdb49d78f9c6393e4 (diff) | |
download | emacs-6d580b00e48e567ac92645e2d120769475d196ad.tar.gz emacs-6d580b00e48e567ac92645e2d120769475d196ad.tar.bz2 emacs-6d580b00e48e567ac92645e2d120769475d196ad.zip |
Some further adaptions wrt Tramp file name locks
* lisp/files.el (files--transform-file-name): Rename from
`auto-save--transform-file-name'. Wrap with `save-match-data'.
(make-auto-save-file-name): Use it.
(make-lock-file-name): Use it. Call file name handler.
* lisp/net/tramp.el (tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
Suppress file lock for temporary file.
* lisp/net/tramp-compat.el (tramp-compat-make-lock-file-name):
New defalias.
* lisp/net/tramp.el (tramp-get-lock-file)
(tramp-handle-lock-file, tramp-handle-unlock-file): Use it.
(tramp-make-lock-name): Remove.
* test/lisp/filenotify-tests.el (file-notify-test03-events-remote):
Tag it :unstable temporarily.
Diffstat (limited to 'lisp/net/tramp-sh.el')
-rw-r--r-- | lisp/net/tramp-sh.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 11037227790..c65800bb0ea 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3274,7 +3274,9 @@ implementation will be used." (or (file-directory-p localname) (file-writable-p localname))))) ;; Short track: if we are on the local host, we can run directly. - (write-region start end localname append 'no-message) + (write-region + start end localname append 'no-message + (and lockname (file-local-name lockname))) (let* ((modes (tramp-default-file-modes filename (and (eq mustbenew 'excl) 'nofollow))) @@ -3308,7 +3310,8 @@ implementation will be used." ;; on. We must ensure that `file-coding-system-alist' ;; matches `tmpfile'. (let ((file-coding-system-alist - (tramp-find-file-name-coding-system-alist filename tmpfile))) + (tramp-find-file-name-coding-system-alist filename tmpfile)) + create-lockfiles) (condition-case err (write-region start end tmpfile append 'no-message) ((error quit) |