unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Miles Bader <miles@gnu.org>
Subject: Re: Opening a Dired buffer with an arbitrary list of files.
Date: Mon, 22 May 2006 22:48:23 +0900	[thread overview]
Message-ID: <87odxqjhlk.fsf@catnip.gol.com> (raw)
In-Reply-To: <u7j4ea7bz.fsf@gmail.com> (Mathias Dahl's message of "Mon, 22 May 2006 08:42:40 +0200")

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.

  reply	other threads:[~2006-05-22 13:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-19 14:34 Opening a Dired buffer with an arbitrary list of files Alder Green
2006-05-19 15:45 ` Kevin Rodgers
2006-05-21 12:10 ` Ehud Karni
     [not found] ` <mailman.2068.1148053935.9609.help-gnu-emacs@gnu.org>
2006-05-22  6:42   ` Mathias Dahl
2006-05-22 13:48     ` Miles Bader [this message]
     [not found]     ` <mailman.2161.1148305715.9609.help-gnu-emacs@gnu.org>
2006-05-23 15:01       ` Mathias Dahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87odxqjhlk.fsf@catnip.gol.com \
    --to=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).