[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp/net tramp.el
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] emacs/lisp/net tramp.el |
Date: |
Mon, 22 Dec 2008 16:39:00 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Michael Albinus <albinus> 08/12/22 16:39:00
Modified files:
lisp/net : tramp.el
Log message:
* net/tramp.el (tramp-rfn-eshadow-update-overlay): Move overlay to
end, before updating.
(tramp-convert-file-attributes): Add "l" indicator to file modes.
(tramp-file-name-real-user, tramp-file-name-domain): New defuns.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/net/tramp.el?cvsroot=emacs&r1=1.217&r2=1.218
Patches:
Index: tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.217
retrieving revision 1.218
diff -u -b -r1.217 -r1.218
--- tramp.el 10 Dec 2008 10:21:06 -0000 1.217
+++ tramp.el 22 Dec 2008 16:38:59 -0000 1.218
@@ -2126,6 +2126,7 @@
(1+ (or (string-match "/" (buffer-string) end) end)) (point-max))
(let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay)
(rfn-eshadow-update-overlay-hook nil))
+ (move-overlay rfn-eshadow-overlay (point-max) (point-max))
(funcall (symbol-function 'rfn-eshadow-update-overlay))))))))
(when (boundp 'rfn-eshadow-update-overlay-hook)
@@ -6654,7 +6655,9 @@
(setcar (nthcdr 7 attr) (round (nth 7 attr))))
;; Convert file mode bits to string.
(unless (stringp (nth 8 attr))
- (setcar (nthcdr 8 attr) (tramp-file-mode-from-int (nth 8 attr))))
+ (setcar (nthcdr 8 attr) (tramp-file-mode-from-int (nth 8 attr)))
+ (when (stringp (car attr))
+ (aset (nth 8 attr) 0 ?l)))
;; Convert directory indication bit.
(when (string-match "^d" (nth 8 attr))
(setcar attr t))
@@ -6793,6 +6796,23 @@
"Return localname component of VEC."
(and (tramp-file-name-p vec) (aref vec 3)))
+;; The user part of a Tramp file name vector can be of kind
+;; "user%domain#port". Sometimes, we must extract these parts.
+(defun tramp-file-name-real-user (vec)
+ "Return the user name of VEC without domain."
+ (let ((user (tramp-file-name-user vec)))
+ (if (and (stringp user)
+ (string-match "\\(.+\\)%\\(.+\\)" user))
+ (match-string 1 user)
+ user)))
+
+(defun tramp-file-name-domain (vec)
+ "Return the domain name of VEC."
+ (let ((user (tramp-file-name-user vec)))
+ (and (stringp user)
+ (string-match "\\(.+\\)%\\(.+\\)" user)
+ (match-string 2 user))))
+
;; The host part of a Tramp file name vector can be of kind
;; "host#port". Sometimes, we must extract these parts.
(defun tramp-file-name-real-host (vec)
@@ -7470,8 +7490,8 @@
(unload-feature 'tramp 'force)
(error nil)))
-(when (and load-in-progress (string-match "Loading tramp..."
- (or (current-message) "")))
+(when (and load-in-progress
+ (string-match "Loading tramp..." (or (current-message) "")))
(message "Loading tramp...done"))
(provide 'tramp)
@@ -7576,6 +7596,8 @@
;; * Add gvfs support.
;; * Set `tramp-copy-size-limit' to 0, when there is no remote
;; encoding routine.
+;; * It makes me wonder if tramp couldn't fall back to ssh when scp
+;; isn't on the remote host. (Mark A. Hershberger)
;; Functions for file-name-handler-alist:
;; diff-latest-backup-file -- in diff.el