cuckoo-search.el adds content-based search features to Elfeed.
Elfeed is a great and mature RSS reader for Emacs. Everyone using Emacs should give it a spin. However, for my particular (and probably niche) use-case it has one important short-coming: it does not allow to search the content of RSS feeds - only tags, titles, dates etc.
cuckoo-search uses ripgrep-magic to address this. It searches the content of all entries currently displayed for specific terms (regexp welcome).
0.2.5
- BREAKING CHANGES: As per Melpa standards, packages should neither automatically activate
add-advice
nor a globalized minor mode. Starting in 0.2.5 you therefore need to add(cuckoo-search-global-mode t)
to your configuration!
0.2.4
- Even more adjustments; added minor-mode
cuckoo-search-mode
and global modecuckoo-search-global-mode
0.2.3
- More adjustments; added GPL v3 license
0.2.2
- More polishing for intended Melpa release
0.2.1
- Now uses
elfeed-db-directory
to get value for data-folder and index file; flycheck package hygiene (thanks @sarg for both suggestions); removed package-lint issues
0.2
- Added
cuckoo-search-saved-searches
functionality
0.1
- Initial release
You do need to have ripgrep
installed on your system and load cuckoo-search after the Elfeed package.
This is my current setup:
(use-package cuckoo-search
:after (elfeed) ;; necessary for use-package
:config
(cuckoo-search-global-mode t) ;; necessary for smooth integration of cuckoo-search into Elfeed
:bind
(:map elfeed-search-mode-map
("C" . cuckoo-search)
("x" . cuckoo-search-saved-searches)))
When visiting the elfeed-search buffer invoke “C” (see above) or M-x cuckoo-search and enter a search term. As ripgrep is using regexp and examines HTML files, you may want to add “\w” after words, for example “price\w” for “price”.
Alternative you could also use “-w Taiwan|China|Ukraine” to search for either Taiwan, China or Ukraine as words.
The functions cuckoo-search-add-search
, cuckoo-search-remove-search
and cuckoo-search-saved-searches
allow for the management of search routines for later/repeated use. Both, Elfeed and cuckoo-search strings can be stored (leave the cuckoo-search-string empty if not needed).
This is an example of a saved search for the combination of the Elfeed tags “+unread +newspaper” and the cuckoo-search “China|chinese|Taiwan|Ukraine”:
A cuckoo relies on other birds to hatch its eggs. In a similar manner, this package uses some Elfeed-code and rg to create the search, hence the name. Also I just finished reading “The Cuckoo’s Egg” by Cliff Stoll. A good book and it has an Emacs story in it.