* net/tramp.el (tramp-remote-file-name-spec-regexp): An IPV6
address can be empty. * net/tramp-gvfs.el (tramp-gvfs-handle-insert-directory): Accept nil SWITCHES. (tramp-gvfs-handle-write-region): Implement APPEND.
This commit is contained in:
parent
946ec22440
commit
11151a064b
3 changed files with 22 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
|||
2013-11-13 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp.el (tramp-remote-file-name-spec-regexp): An IPV6
|
||||
address can be empty.
|
||||
|
||||
* net/tramp-gvfs.el (tramp-gvfs-handle-insert-directory):
|
||||
Accept nil SWITCHES.
|
||||
(tramp-gvfs-handle-write-region): Implement APPEND.
|
||||
|
||||
2013-11-12 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
* progmodes/ruby-mode.el (ruby-smie-grammar): Disambiguate between
|
||||
|
|
|
@ -1009,6 +1009,7 @@ is no information where to trace the message.")
|
|||
(filename switches &optional wildcard full-directory-p)
|
||||
"Like `insert-directory' for Tramp files."
|
||||
;; gvfs-* output is hard to parse. So we let `ls-lisp' do the job.
|
||||
(unless switches (setq switches ""))
|
||||
(with-parsed-tramp-file-name (expand-file-name filename) nil
|
||||
(with-tramp-progress-reporter v 0 (format "Opening directory %s" filename)
|
||||
(require 'ls-lisp)
|
||||
|
@ -1075,7 +1076,7 @@ is no information where to trace the message.")
|
|||
(tramp-flush-file-property v localname))))))
|
||||
|
||||
(defun tramp-gvfs-handle-write-region
|
||||
(start end filename &optional _append visit _lockname confirm)
|
||||
(start end filename &optional append visit lockname confirm)
|
||||
"Like `write-region' for Tramp files."
|
||||
(with-parsed-tramp-file-name filename nil
|
||||
;; XEmacs takes a coding system as the seventh argument, not `confirm'.
|
||||
|
@ -1084,7 +1085,16 @@ is no information where to trace the message.")
|
|||
(tramp-error v 'file-error "File not overwritten")))
|
||||
|
||||
(let ((tmpfile (tramp-compat-make-temp-file filename)))
|
||||
(write-region start end tmpfile)
|
||||
(when (and append (file-exists-p filename))
|
||||
(copy-file filename tmpfile 'ok))
|
||||
;; We say `no-message' here because we don't want the visited file
|
||||
;; modtime data to be clobbered from the temp file. We call
|
||||
;; `set-visited-file-modtime' ourselves later on.
|
||||
(tramp-run-real-handler
|
||||
'write-region
|
||||
(if confirm ; don't pass this arg unless defined for backward compat.
|
||||
(list start end tmpfile append 'no-message lockname confirm)
|
||||
(list start end tmpfile append 'no-message lockname)))
|
||||
(condition-case nil
|
||||
(rename-file tmpfile filename 'ok-if-already-exists)
|
||||
(error
|
||||
|
|
|
@ -848,7 +848,7 @@ Derived from `tramp-postfix-host-format'.")
|
|||
"\\(?:" "\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp "\\)?"
|
||||
"\\(?:" "\\(" tramp-user-regexp "\\)" tramp-postfix-user-regexp "\\)?"
|
||||
"\\(" "\\(?:" tramp-host-regexp "\\|"
|
||||
tramp-prefix-ipv6-regexp tramp-ipv6-regexp
|
||||
tramp-prefix-ipv6-regexp "\\(?:" tramp-ipv6-regexp "\\)?"
|
||||
tramp-postfix-ipv6-regexp "\\)"
|
||||
"\\(?:" tramp-prefix-port-regexp tramp-port-regexp "\\)?" "\\)?")
|
||||
"Regular expression matching a Tramp file name between prefix and postfix.")
|
||||
|
|
Loading…
Add table
Reference in a new issue