tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tramp-handle-insert-directory


From: Katsumi Yamaoka
Subject: tramp-handle-insert-directory
Date: Thu, 13 Mar 2003 22:06:47 +0900
User-agent: Gnus/5.090016 (Oort Gnus v0.16) XEmacs/21.4 (Portable Code, usg-unix-v)

Hi,

It seems that the "Another XEmacs specialty" at the end of the
tramp-handle-insert-directory function is needless.  If it
exists, I got the following result in the XEmacs dired buffer
just after editing and saving the "bar" file:

--8<---------------cut here---------------start------------->8---
  /address@hidden/home/yamaoka/tmp:
  total 16
  drwxr-sr-x    2 yamaoka  yamaoka      4096 Mar 13 20:40 .
  drwxr-sr-x    6 yamaoka  yamaoka      4096 Mar  6 19:44 ..  -rw-r--r--    1 
yamaoka  yamaoka         5 Mar 13 21:57 bar

  -rw-r--r--    1 yamaoka  yamaoka         5 Mar 13 21:40 foo
--8<---------------cut here---------------end--------------->8---

After removing that "specialty", I got the normal result.  Here
is a patch for it:

--8<---------------cut here---------------start------------->8---
--- tramp.el~   2003-03-02 14:45:00 +0000
+++ tramp.el    2003-03-13 13:05:15 +0000
@@ -2831,25 +2831,17 @@
                   (file-name-nondirectory localname)))))
       (sit-for 1)                      ;needed for rsh but not ssh?
       (tramp-wait-for-output))
-    (let ((old-pos (point)))
-      (insert-buffer-substring
-       (tramp-get-buffer multi-method method user host))
-      ;; On XEmacs, we want to call (exchange-point-and-mark t), but
-      ;; that doesn't exist on Emacs, so we use this workaround instead.
-      ;; Since zmacs-region-stays doesn't exist in Emacs, this ought to
-      ;; be safe.  Thanks to Daniel Pittman <address@hidden>.
-      ;;     (let ((zmacs-region-stays t))
-      ;;       (exchange-point-and-mark))
-      (save-excursion
-       (tramp-send-command multi-method method user host "cd")
-       (tramp-wait-for-output))
-      ;; Another XEmacs specialty follows.  What's the right way to do
-      ;; it?
-      (when (and (featurep 'xemacs)
-                (eq major-mode 'dired-mode))
-       (save-excursion
-         (require 'dired)
-         (dired-insert-set-properties old-pos (point)))))))
+    (insert-buffer-substring
+     (tramp-get-buffer multi-method method user host))
+    ;; On XEmacs, we want to call (exchange-point-and-mark t), but
+    ;; that doesn't exist on Emacs, so we use this workaround instead.
+    ;; Since zmacs-region-stays doesn't exist in Emacs, this ought to
+    ;; be safe.  Thanks to Daniel Pittman <address@hidden>.
+    ;;     (let ((zmacs-region-stays t))
+    ;;       (exchange-point-and-mark))
+    (save-excursion
+      (tramp-send-command multi-method method user host "cd")
+      (tramp-wait-for-output))))
 
 ;; Continuation of kluge to pacify byte-compiler.
 ;;(eval-when-compile
--8<---------------cut here---------------end--------------->8---
-- 
Katsumi Yamaoka <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]