[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/net/tramp.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/net/tramp.el [lexbind] |
Date: |
Sat, 04 Sep 2004 05:42:54 -0400 |
Index: emacs/lisp/net/tramp.el
diff -c emacs/lisp/net/tramp.el:1.34.2.10 emacs/lisp/net/tramp.el:1.34.2.11
*** emacs/lisp/net/tramp.el:1.34.2.10 Fri Jul 23 04:42:20 2004
--- emacs/lisp/net/tramp.el Sat Sep 4 09:22:56 2004
***************
*** 2055,2061 ****
(defun tramp-handle-file-truename (filename &optional counter prev-dirs)
"Like `file-truename' for tramp files."
! (with-parsed-tramp-file-name filename nil
(let* ((steps (tramp-split-string localname "/"))
(localnamedir (tramp-let-maybe directory-sep-char ?/ ;for XEmacs
(file-name-as-directory localname)))
--- 2055,2061 ----
(defun tramp-handle-file-truename (filename &optional counter prev-dirs)
"Like `file-truename' for tramp files."
! (with-parsed-tramp-file-name (expand-file-name filename) nil
(let* ((steps (tramp-split-string localname "/"))
(localnamedir (tramp-let-maybe directory-sep-char ?/ ;for XEmacs
(file-name-as-directory localname)))
***************
*** 2299,2330 ****
(unless (buffer-file-name)
(error "Can't set-visited-file-modtime: buffer `%s' not visiting a file"
(buffer-name)))
! (when time-list
! (tramp-run-real-handler 'set-visited-file-modtime (list time-list)))
! (let ((f (buffer-file-name))
! (coding-system-used nil))
! (with-parsed-tramp-file-name f nil
! (let* ((attr (file-attributes f))
! (modtime (nth 5 attr)))
! ;; We use '(0 0) as a don't-know value. See also
! ;; `tramp-handle-file-attributes-with-ls'.
! (when (boundp 'last-coding-system-used)
! (setq coding-system-used last-coding-system-used))
! (if (not (equal modtime '(0 0)))
! (tramp-run-real-handler 'set-visited-file-modtime (list modtime))
! (save-excursion
! (tramp-send-command
! multi-method method user host
! (format "%s -ild %s"
! (tramp-get-ls-command multi-method method user host)
! (tramp-shell-quote-argument localname)))
! (tramp-wait-for-output)
! (setq attr (buffer-substring (point)
! (progn (end-of-line) (point)))))
! (setq tramp-buffer-file-attributes attr))
! (when (boundp 'last-coding-system-used)
! (setq last-coding-system-used coding-system-used))
! nil))))
;; CCC continue here
--- 2299,2331 ----
(unless (buffer-file-name)
(error "Can't set-visited-file-modtime: buffer `%s' not visiting a file"
(buffer-name)))
! (if time-list
! (tramp-run-real-handler 'set-visited-file-modtime (list time-list))
! (let ((f (buffer-file-name))
! (coding-system-used nil))
! (with-parsed-tramp-file-name f nil
! (let* ((attr (file-attributes f))
! ;; '(-1 65535) means file doesn't exists yet.
! (modtime (or (nth 5 attr) '(-1 65535))))
! ;; We use '(0 0) as a don't-know value. See also
! ;; `tramp-handle-file-attributes-with-ls'.
! (when (boundp 'last-coding-system-used)
! (setq coding-system-used last-coding-system-used))
! (if (not (equal modtime '(0 0)))
! (tramp-run-real-handler 'set-visited-file-modtime (list modtime))
! (save-excursion
! (tramp-send-command
! multi-method method user host
! (format "%s -ild %s"
! (tramp-get-ls-command multi-method method user host)
! (tramp-shell-quote-argument localname)))
! (tramp-wait-for-output)
! (setq attr (buffer-substring (point)
! (progn (end-of-line) (point)))))
! (setq tramp-buffer-file-attributes attr))
! (when (boundp 'last-coding-system-used)
! (setq last-coding-system-used coding-system-used))
! nil)))))
;; CCC continue here
***************
*** 3811,3818 ****
(unless (equal curbuf (current-buffer))
(error "Buffer has changed from `%s' to `%s'"
curbuf (current-buffer)))
! (when (eq visit t)
! (set-visited-file-modtime))
;; Make `last-coding-system-used' have the right value.
(when (boundp 'last-coding-system-used)
(setq last-coding-system-used coding-system-used))
--- 3812,3822 ----
(unless (equal curbuf (current-buffer))
(error "Buffer has changed from `%s' to `%s'"
curbuf (current-buffer)))
! (when (or (eq visit t) (stringp visit))
! (set-visited-file-modtime
! ;; We must pass modtime explicitely, because filename can be different
! ;; from (buffer-file-name), f.e. if `file-precious-flag' is set.
! (nth 5 (file-attributes filename))))
;; Make `last-coding-system-used' have the right value.
(when (boundp 'last-coding-system-used)
(setq last-coding-system-used coding-system-used))
***************
*** 5847,5853 ****
multi-method method user host
(concat "tramp_file_attributes () {\n"
tramp-remote-perl
! " -e '" tramp-perl-file-attributes "' $1 $2 2>/dev/null\n"
"}"))
(tramp-wait-for-output)
(unless (tramp-method-out-of-band-p multi-method method user host)
--- 5851,5858 ----
multi-method method user host
(concat "tramp_file_attributes () {\n"
tramp-remote-perl
! " -e '" tramp-perl-file-attributes "'"
! " \"$1\" \"$2\" 2>/dev/null\n"
"}"))
(tramp-wait-for-output)
(unless (tramp-method-out-of-band-p multi-method method user host)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/net/tramp.el [lexbind],
Miles Bader <=