0

When in press letter "b" within a elfeed search window, the in-effect elfeed filter should change from whatever it has (default - @6-months-ago +unread) to "foo"

How can I do it?

what I tried

(setq elfeed-search-filter "foo")   

1 Answer 1

2

You can use the function elfeed-search-set-filter non-interactively:

(elfeed-search-set-filter "foo")

Underneath, this boils down to something very similar to your attempt:

(with-current-buffer (elfeed-search-buffer)
   (setf elfeed-search-filter "foo")
   (elfeed-search-update :force))

If you want to make the "foo" filter have its own binding, you can wrap that elfeed-search-set-filter call into an interactive function and bind that to b:

(define-key elfeed-search-mode-map "b" #'<your function's name>)
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.