emacs-devel
[Top][All Lists]
Advanced

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

find-dired for remote directories


From: Michael Albinus
Subject: find-dired for remote directories
Date: Mon, 16 Feb 2004 00:43:12 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)

Hello,

find-dired works over local directories only. I've made a patch that
it calls `shell-command' (asynchronously) instead of
`start-process-shell-command'. By this, `find-grep-dired' and
`find-name-dired` work over remote directories too, using Tramp.

The patch looks like this:

magdalene:~/src/emacs/lisp> diff -u find-dired.el.~1.46.~ find-dired.el
--- find-dired.el.~1.46.~       2003-12-29 23:03:51.000000000 +0100
+++ find-dired.el       2004-02-15 15:50:10.000000000 +0100
@@ -121,6 +121,8 @@
                           ""
                         (concat "\\( " args " \\) "))
                       (car find-ls-option)))
+    ;; Start the find process.
+    (shell-command (concat args "&") (current-buffer))
     ;; The next statement will bomb in classic dired (no optional arg allowed)
     (dired-mode dir (cdr find-ls-option))
     (let ((map (make-sparse-keymap)))
@@ -149,8 +151,7 @@
     ;; ``wildcard'' line.
     (insert "  " args "\n")
     (setq buffer-read-only t)
-    ;; Start the find process.
-    (let ((proc (start-process-shell-command find-dired-find-program 
(current-buffer) args)))
+    (let ((proc (get-buffer-process (current-buffer))))
       (set-process-filter proc (function find-dired-filter))
       (set-process-sentinel proc (function find-dired-sentinel))
       ;; Initialize the process marker; it is used by the filter.

Wouldn't it be worth to apply it in the Emacs CVS? It doesn't harm in
the case of local directories. Unfortunately, I have no write access
(but I've signed the papers months ago).

Please note that the corresponding patch enabling Tramp's
`shell-command' for asynchronous processes is committed to Tramp CVS
only until now. It will appear in Emacs CVS with the next
synchronization by Kai.

Best regards, Michael.




reply via email to

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