1

I'm using Elfeed as an RSS client. Given an *elfeed-search* buffer, I would like to know the word frequencies in the current search. I've looked at this answer, and while the proposed function works great for a normal buffer with text, it breaks in the above scenario.

Ideally, I would like count only the frequencies of the words that appears in the titles, not in the publishers' names, tags, or dates.

Any suggestion on how to achieve this? Alternatively, any pointers to relevant elisp tutorials?

0

You can get all the titles in the current elfeed-search buffer like this:

(with-current-buffer "*elfeed-search*"
  (cl-loop for entry in elfeed-search-entries
       collect
       (elfeed-entry-title entry)))

I assume you can take this list and process it using the linked solution or something like it?

|improve this answer|||||
  • Thanks for pointing me in the right direction. I've replaced collect with concat and can feed it right into the linked solution. There are some cases where I get an error, but I'm sure I'll be able to find a solution on my own. Thanks again! – red Oct 28 '18 at 8:47
  • If the error isn't important, e.g. if it is from entries with no title, you can wrap the title command in (ignore-errors ...). or put some other test for stringp, or do something like concat (or (elfeed-entry-title entry) ""). – John Kitchin Oct 28 '18 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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