Hello,
I realize that it's a bit late for the V3 release, but I have a
feature I'd like to submit, so that it becomes part of EMMS. If you're
not using the browser (that's you, forcer :p), you may skip to the next
mail.
The browser offers a nice filter possibility, which I use quite
intensively, and you can navigate between filters with < and >. But
sometimes that's not fast enough, especially since a) the
filter I want is almost always the last one b) I have quite a big cache,
and it takes several *seconds* to swap it out.
So I had the idea to implement (yes, I wrote some elisp code, call the
newspapers) something a bit friendlier. Here's the whole code, awaiting
for your advice about how to write the same in 2 lines :
;; define some filters, change the paths, unless you've got an account
;; to my computer
(emms-browser-make-filter "Albums" (emms-browser-filter-only-dir
"/zic/Albums/"))
(emms-browser-make-filter "Jazz" (emms-browser-filter-only-dir "/zic/Jazz/"))
(emms-browser-make-filter "All" (emms-browser-filter-only-dir "/zic/"))
;; I'm not sure I can produce something uglier than this right now
(defun my-emms-build-filter-list ()
(let (( l (mapcar (lambda (el) (car el)) emms-browser-filters)))
(mapcar (lambda (el)
`(,el . ,el)) (reverse l))))
;; pop-up the list, move with <up>/<down>, select with RET
(defun my-emms-popup ()
(interactive)
(funcall (intern
(format "emms-browser-show-%s"
(x-popup-menu (list '(300 50) (selected-window))
(list "Choose filter" (append (list "AAa")
(my-emms-build-filter-list))))))))
;; bind, hook, etc.
(defun my-emms-browser-hook ()
(local-set-key (kbd "C-c C-c") 'my-emms-popup))
(add-hook 'emms-browser-show-display-hook 'my-emms-browser-hook)
--
Lucas
_______________________________________________
Emms-help mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emms-help