[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Opening a Dired buffer with an arbitrary list of files.
From: |
Miles Bader |
Subject: |
Re: Opening a Dired buffer with an arbitrary list of files. |
Date: |
Mon, 22 May 2006 22:48:23 +0900 |
Mathias Dahl <brakjoller@gmail.com> writes:
> (defun gds-dired-2 ()
> "Use Google Desktop Search to find files and list them in dired.
> It generates a result like `find-dired' does, but uses Google
> Desktop Search to find matching files."
> (interactive)
> (let ((dir (read-directory-name "Set current directory: "))
> (search (read-string "Search string: ")))
> (dired (cons dir (gds-get-matching-files
> search gds-dired-number-of-hits)))))
A bit shorter still (and demonstrating the typical use of `interactive'):
(defun gds-dired-3 (dir pattern)
"Use Google Desktop Search to find files in DIR matching PATTERN
and list them in dired."
(interactive "DSearch directory: \nsSearch pattern: ")
(dired (cons dir (gds-get-matching-files pattern gds-dired-number-of-hits))))
-miles
--
.Numeric stability is probably not all that important when you're guessing.