(Maybe the following already exists - if so, please let me know in the comments.)
I'm in the process of switching from moc to EMMS, and so far I'm pretty happy with it. However, there's one feature in moc which I'm missing, and that is a special type of interactive search: While you type a search string in moc, you do not just jump to the first matching title, but the list of titles is reduced to those matching the current search. In Emacs-speak, you might name this an "interactive occur".
While I couldn't exactly find this kind of search, I stumbled upon loccur; while the the normal occur-mode opens a new buffer with the matching lines, loccur-mode works directly in the buffer you're currently working with. So, the only task remaining is to hook loccur into isearch. This is what I came up with:
(require 'loccur) (defadvice isearch-update (after DE-call-loccur ()) (let ((loccur-mode nil)) (loccur-mode (regexp-quote isearch-string)))) (ad-activate 'isearch-update) (add-hook 'isearch-mode-end-hook (lambda () (loccur-mode nil)))
I had to use 'defadvice' since there's no hook in isearch-update I could use instead.
Now, you only have to put loccur.el into your load-path and evaluate the above code snippet. When you now call up isearch, all lines which do not currently match your search string will be hidden. To deactivate this feature, just do
(ad-deactivate 'isearch-update)
(autoload 'loccur-mode "loccur") (add-hook 'isearch-update-post-hook (lambda () (let ((loccur-mode nil)) (loccur-mode (regexp-quote isearch-string))))) (add-hook 'isearch-mode-end-hook (lambda () (loccur-mode nil)))