2.2 Starting elfeed-score

Once you’ve setup your score file, and assuming you’ve installed elfeed-score, begin or switch to your Emacs session and say:

(require 'elfeed-score)

Just loading the library will *not* modify elfeed; you need to explicitly enable the package for that:

(elfeed-score-enable)

This will install the new sort function & new entry hook, as well as read your score file. NB. elfeed-score-enable is autoloaded, so if you’ve installed this package in the usual way, you should be able to just invoke the function & have the package loaded & enabled automatically.

Command: elfeed-score-enable

Install the new sort function & the new entry hook. Read the score file. With prefix arg do not install the custom sort function.

Some elfeed users have already customized elfeed-search-sort-function and may not wish to have elfeed-score install a new one. elfeed-score-enable takes a prefix argument: if present, it will install the new entry hook & commence scoring, but will not install the new sort function. Such users may refer to elfeed-score-sort if they would like to incorporate scoring into their sort functions.

Utility: elfeed-score-sort

elfeed-search-sort-function-compliant function that will sort elfeed entries by score first, then timestamp.

The package defines a keymap, but does not bind it to any key. I like to set it to the = key:

(define-key elfeed-search-mode-map "=" elfeed-score-map)

Now, only when you’re in the elfeed-score search buffer, you can access elfeed-score commands on the = key.

elfeed allows us to customize how entries are displayed in the elfeed search buffer through the variable elfeed-search-print-entry-function. Because users have customized this, elfeed-score does not alter this variable directly Rather, it offers a replacement implementation, elfeed-score-print-entry, should you wish to use it.

Utility: elfeed-score-print-entry

Prefix each entry with its score when displayed in the elfeed search buffer.

Install it like so:

(setq elfeed-search-print-entry-function #'elfeed-score-print-entry)

While this is not turned on by elfeed-score-enable, elfeed-score-unload will remove it, if it’s there.

Command: elfeed-score-unload

Unload elfeed-score.

Even if you’ve customized the elfeed print function, if you would like to incorporate the score into your version, you can use the elfeed-score-print-entry implementation for inspiration.