[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bongo-devel] bongo-locate
From: |
Dieter Deyke |
Subject: |
[bongo-devel] bongo-locate |
Date: |
Sat, 10 Feb 2007 13:08:03 -0700 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (windows-nt) |
Sometimes I want to listen to a song or group of songs where the
filename contains a certain substring, or multiple substrings. I have
written a function called bongo-locate which does that for me:
(setq bongo-locate-command "locate --all --ignore-case")
(defun bongo-locate (args)
(interactive "sSubstrings: ")
(let ((buf (get-buffer-create "*Bongo LOCATE*"))
(m3u-file (make-temp-file "locate" nil ".m3u")))
(shell-command (concat bongo-locate-command args " > " m3u-file))
(with-current-buffer buf
(bongo-library-mode))
(switch-to-buffer buf)
(let ((inhibit-read-only t))
(erase-buffer))
(bongo-insert-m3u-playlist-contents m3u-file)
(delete-file m3u-file)))
Now, I am not a good elisp coder, so it would be nice if someone could
improve my code, and add it to the standard distribution if it looks
useful.
--
Dieter Deyke
mailto:address@hidden mailto:address@hidden mailto:address@hidden
Vs lbh pna ernq guvf, lbh unir jnl gbb zhpu gvzr.
- [bongo-devel] bongo-locate,
Dieter Deyke <=