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:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Vs lbh pna ernq guvf, lbh unir jnl gbb zhpu gvzr.



_______________________________________________
bongo-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/bongo-devel

Reply via email to