gnu-emacs-sources
[Top][All Lists]
Advanced

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

Re: ;;; anything.el --- open anything


From: Vagn Johansen
Subject: Re: ;;; anything.el --- open anything
Date: Sun, 22 Jul 2007 16:33:51 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt)

"address@hidden" <address@hidden> writes:

> On Jul 21, 8:27 pm, Tassilo Horn <address@hidden> wrote:
>
>> Who needs Spotlight if he has emacs, right? ;-)
>
> Spotlight can be a backend for a source. :)

Yep.

Just use the locate-like program mdfind.

(defvar anything-source-mdfind
  '((name . "mdfind")
     (candidates . (lambda ()
                     (start-process "mdfind-process" nil
                       "mdfind" anything-pattern)))
     (action . (("Find file" . find-file)
                 ("Open" . 
                   (lambda (file-name)
                     (shell-command
                       (concat "open " (shell-quote-argument file-name))
                       nil)))))
     (type . file)
     (requires-pattern . 3))
  "Source for retrieving files via mdfind.")

(add-to-list 'anything-sources anything-source-mdfind)


-- 
Vagn Johansen


reply via email to

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