Re: Replacement for emms-browser-set-filter?

Erica Qi <[email protected]> Wed, 16 Jul 2025 07:51:07 +0000
Newsgroups gmane.emacs.emms.user
Message-ID <xl8RLC0oanD9h9rrfUJLaYPyjTkisq0oulnVCFzW_2wdS6IhTnTP78NfQ6hND3zLaTaKcdEqZKV7gfTGMiZ2AYJfL-BSy44rGMuqrWw8UPE=@proton.me>
The manual says this about the hook you want.

The section about the filter system is, by far, the largest section in the manual.

I found this near the top somewhere inside the backward compatibility section.

https://www.gnu.org/software/emms/manual/#Backward-Compatibility

The last hook is the emms-filters-expand-render-hook. This is just so that Emms-Filters can tell the renderer to expand its tree when there is a filter or cache stack present and something has changed. For Emms-Browser this is the function emms-browser-expand-all

;; (add-hook 'emms-filters-expand-render-hook 'emms-browser-expand-all)

Envoyé depuis Proton Mail pour Android

-------- Message d'origine --------
Le 15/07/2025 20:23, Fran Burstall (Gmail)  a écrit :

> Thanks for the explanation.
>
> To make sure I understand interactive searches, is the following correct?
>
> In the browser, I hit s then a (to search by artist) and enter "Led Zep" to see all my Led Zeppelin albums. This works pretty well. To get back to seeing all my albums, I have to pop the cache stack (thus hit c then q)---I had to think a bit to get this second part.
>
> Another small thing: the search display expands the browser entries on view. Is there a variable or hook to prevent this behaviour?
>
> ---Fran
>
> On Tue, 15 Jul 2025 at 09:03, Erica Qi <[email protected]> wrote:
>
>> Oh I see.
>>
>> The browser no longer creates or manages filters.
>>
>> If you have your own filter functions all of that should continue to work but it's no longer necessary to build them that way.
>>
>> The default filter of 'all' is no longer necessary.
>>
>> If you would like to activate a different filter that filter should be pushed onto the filter stack.
>>
>> (emms-filters-push "my-filter-name")
>>
>> You can add to the filter with push-and, push-or and push-not.
>>
>> Remove a filter or a piece of one with pop.
>>
>> A push of another filter would over-ride the current filter. All would remain on the stack.
>>
>> If a filter name is not given you will be prompted to choose or create one.
>>
>> Popping will take you back to the the previous filter. You can see the two stacks, the current filter and filter ring with
>>
>> (emms-filters-status)
>>
>> Other helpful functions begin with emms-filters-show-*
>>
>> If you wish for the first filter to stick and all other subsequent filters to see only what the first filter allows you can do
>>
>> (emms-filters-hard-filter).
>>
>> That will push a cache on the cache stack for all subsequent filters and searches. The filter could then be popped as it would be redundant.
>>
>> A search will use the current cache and also push a new cache to the stack.
>>
>> Pop will remove it.
>>
>> All filtering and searching operates on the cache on the top of the cache stack. If empty the default is the emms-cache-db.
>>
>> All of these functions and more are in the browsers mode map.
>>
>> I hope that helps. Let me know if you have questions.
>>
>> Erica
>>
>> Envoyé depuis Proton Mail pour Android
>>
>> -------- Message d'origine --------
>> Le 15/07/2025 00:43, Yoni Rabkin <[email protected]> a écrit :
>>
>>> "Fran Burstall (Gmail)" <[email protected]> writes:
>>>
>>> > An artifact of the new filter system is that emms-browser-set-filter is no
>>> > longer defined.
>>> >
>>> > Can someone point me to the replacement or equivalent functionality?
>>> >
>>> > Thanks,
>>> >
>>> > ---Fran
>>>
>>> This is a great opportunity for Erica to step and help guide us with the
>>> new system.
>>>
>>> --
>>> "Cut your own wood and it will warm you twice"
>>>
>>>