diff options
| author | Michael Albinus | 2008-12-22 16:40:14 +0000 |
|---|---|---|
| committer | Michael Albinus | 2008-12-22 16:40:14 +0000 |
| commit | dea31ca610d73d215c97ca0d955bb39051dc723c (patch) | |
| tree | 5dce9ad4469b208f5d34430b7add58bdd3a44bb4 | |
| parent | 8b1463121ee4758f36e3fb78e3afb764ef6fea0e (diff) | |
| download | emacs-dea31ca610d73d215c97ca0d955bb39051dc723c.tar.gz emacs-dea31ca610d73d215c97ca0d955bb39051dc723c.zip | |
* 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.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 28 |
2 files changed, 32 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c1eb23bc64f..ebe5c8d808b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2008-12-22 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-rfn-eshadow-update-overlay): Move overlay to | ||
| 4 | end, before updating. | ||
| 5 | (tramp-convert-file-attributes): Add "l" indicator to file modes. | ||
| 6 | (tramp-file-name-real-user, tramp-file-name-domain): New defuns. | ||
| 7 | |||
| 1 | 2008-12-21 Martin Rudalics <rudalics@gmx.at> | 8 | 2008-12-21 Martin Rudalics <rudalics@gmx.at> |
| 2 | 9 | ||
| 3 | * window.el (set-window-text-height): Fix doc-string. | 10 | * window.el (set-window-text-height): Fix doc-string. |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 031d2fecc32..7e364a174ff 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -2126,6 +2126,7 @@ been set up by `rfn-eshadow-setup-minibuffer'." | |||
| 2126 | (1+ (or (string-match "/" (buffer-string) end) end)) (point-max)) | 2126 | (1+ (or (string-match "/" (buffer-string) end) end)) (point-max)) |
| 2127 | (let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay) | 2127 | (let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay) |
| 2128 | (rfn-eshadow-update-overlay-hook nil)) | 2128 | (rfn-eshadow-update-overlay-hook nil)) |
| 2129 | (move-overlay rfn-eshadow-overlay (point-max) (point-max)) | ||
| 2129 | (funcall (symbol-function 'rfn-eshadow-update-overlay)))))))) | 2130 | (funcall (symbol-function 'rfn-eshadow-update-overlay)))))))) |
| 2130 | 2131 | ||
| 2131 | (when (boundp 'rfn-eshadow-update-overlay-hook) | 2132 | (when (boundp 'rfn-eshadow-update-overlay-hook) |
| @@ -6654,7 +6655,9 @@ Return ATTR." | |||
| 6654 | (setcar (nthcdr 7 attr) (round (nth 7 attr)))) | 6655 | (setcar (nthcdr 7 attr) (round (nth 7 attr)))) |
| 6655 | ;; Convert file mode bits to string. | 6656 | ;; Convert file mode bits to string. |
| 6656 | (unless (stringp (nth 8 attr)) | 6657 | (unless (stringp (nth 8 attr)) |
| 6657 | (setcar (nthcdr 8 attr) (tramp-file-mode-from-int (nth 8 attr)))) | 6658 | (setcar (nthcdr 8 attr) (tramp-file-mode-from-int (nth 8 attr))) |
| 6659 | (when (stringp (car attr)) | ||
| 6660 | (aset (nth 8 attr) 0 ?l))) | ||
| 6658 | ;; Convert directory indication bit. | 6661 | ;; Convert directory indication bit. |
| 6659 | (when (string-match "^d" (nth 8 attr)) | 6662 | (when (string-match "^d" (nth 8 attr)) |
| 6660 | (setcar attr t)) | 6663 | (setcar attr t)) |
| @@ -6793,6 +6796,23 @@ Not actually used. Use `(format \"%o\" i)' instead?" | |||
| 6793 | "Return localname component of VEC." | 6796 | "Return localname component of VEC." |
| 6794 | (and (tramp-file-name-p vec) (aref vec 3))) | 6797 | (and (tramp-file-name-p vec) (aref vec 3))) |
| 6795 | 6798 | ||
| 6799 | ;; The user part of a Tramp file name vector can be of kind | ||
| 6800 | ;; "user%domain#port". Sometimes, we must extract these parts. | ||
| 6801 | (defun tramp-file-name-real-user (vec) | ||
| 6802 | "Return the user name of VEC without domain." | ||
| 6803 | (let ((user (tramp-file-name-user vec))) | ||
| 6804 | (if (and (stringp user) | ||
| 6805 | (string-match "\\(.+\\)%\\(.+\\)" user)) | ||
| 6806 | (match-string 1 user) | ||
| 6807 | user))) | ||
| 6808 | |||
| 6809 | (defun tramp-file-name-domain (vec) | ||
| 6810 | "Return the domain name of VEC." | ||
| 6811 | (let ((user (tramp-file-name-user vec))) | ||
| 6812 | (and (stringp user) | ||
| 6813 | (string-match "\\(.+\\)%\\(.+\\)" user) | ||
| 6814 | (match-string 2 user)))) | ||
| 6815 | |||
| 6796 | ;; The host part of a Tramp file name vector can be of kind | 6816 | ;; The host part of a Tramp file name vector can be of kind |
| 6797 | ;; "host#port". Sometimes, we must extract these parts. | 6817 | ;; "host#port". Sometimes, we must extract these parts. |
| 6798 | (defun tramp-file-name-real-host (vec) | 6818 | (defun tramp-file-name-real-host (vec) |
| @@ -7470,8 +7490,8 @@ Only works for Bourne-like shells." | |||
| 7470 | (unload-feature 'tramp 'force) | 7490 | (unload-feature 'tramp 'force) |
| 7471 | (error nil))) | 7491 | (error nil))) |
| 7472 | 7492 | ||
| 7473 | (when (and load-in-progress (string-match "Loading tramp..." | 7493 | (when (and load-in-progress |
| 7474 | (or (current-message) ""))) | 7494 | (string-match "Loading tramp..." (or (current-message) ""))) |
| 7475 | (message "Loading tramp...done")) | 7495 | (message "Loading tramp...done")) |
| 7476 | 7496 | ||
| 7477 | (provide 'tramp) | 7497 | (provide 'tramp) |
| @@ -7576,6 +7596,8 @@ Only works for Bourne-like shells." | |||
| 7576 | ;; * Add gvfs support. | 7596 | ;; * Add gvfs support. |
| 7577 | ;; * Set `tramp-copy-size-limit' to 0, when there is no remote | 7597 | ;; * Set `tramp-copy-size-limit' to 0, when there is no remote |
| 7578 | ;; encoding routine. | 7598 | ;; encoding routine. |
| 7599 | ;; * It makes me wonder if tramp couldn't fall back to ssh when scp | ||
| 7600 | ;; isn't on the remote host. (Mark A. Hershberger) | ||
| 7579 | 7601 | ||
| 7580 | ;; Functions for file-name-handler-alist: | 7602 | ;; Functions for file-name-handler-alist: |
| 7581 | ;; diff-latest-backup-file -- in diff.el | 7603 | ;; diff-latest-backup-file -- in diff.el |