2.1 Scoring

elfeed is an extensible RSS & Atom reader for Emacs. By default, it will display entries in reverse chronological order. This package defines a bit of metadata for each of your elfeed entries: a "score". A score is an integer (negative or positive), and higher scores denote entries of greater interest to you. This package also (optionally) installs a new sort function, so that Elfeed will display entries with higher scores before entries with lower scores (entries with the same scores will still be sorted in reverse chronological order). It also provides an entry display function for the search buffer that displays each entry’s score, should you choose to install it.

While you can manually assign a score to an entry, you will likely find it more convenient to create rules for scoring that will be automatically applied to each new entry every time you update Elfeed. You can score against title, feed, content & authors by defining strings that will be matched against those attributes by substring, regexp or whole-word match. You can score against the feed. You can also score against the presence or absence of tags. Most kinds of rules can be scoped by Elfeed entry tags, so that a rule will only be applied if an entry has certain tags (or does not have certain tags). Many kinds of rules may also be scoped by feed, so that a rule will only be applied to entries from certain feeds (or not from certain feeds). Each rule defines an integral value, and the rules are applied in order of definition. The new entry’s score begins at elfeed-score-scoring-default-score, and is adjusted by the value defined by each matching scoring rule.

User Option: elfeed-score-scoring-default-score

The default score for an elfeed entry.

For instance, here’s a subset of my scoring file at the moment:

;;; Elfeed score file                                     -*- lisp -*-
  (("title"
    (:text "OPEN THREAD" :value -1000 :type S :date 1576681345.4086394)
    (:text "raymond c\\(hen\\)?" :value 250 :type r
    :date 1576808786.1558545) :tags (t .(@dev)))
   ("content"
    (:text "type erasure" :value 500 :type s :date 1576808786.043517))
   ("title-or-content"
    (:text "california" 150 100 :type s :date 1576808786.4068587)
    (:text "china" 150 100 :type w :date 1576808786.1848788))
   ("feed"
    (:text "Essays in Idleness" :value 250 :type S :attr t
    :date 1576808786.1956885)
    (:text "Irreal" :value 250 :type S :attr t
    :date 1576808786.1765869)
    (:text "Julia Evans" :value 100 :type :type s :attr t
    :date 1576808786.4092398)
    (:text "National Weather Service" :value 400 :type S :attr t
    :date 1576808786.1117532)
    (:text "emacs-news – sacha chua" :value 350 :type S :attr t
    :date 1576808785.3807983))
   ("authors"
     (:text "Jim Geraghty" :value 500 :type s :date 1611757856.1711636
      :hits 150))
   ("tag"
    (:tags (t . reddit-question)
     :value 750))
   (mark -2500))

Like Gnus scoring, this may look like Lisp code, but it is not directly evaluated. It will be read by the Lisp reader, so it must at least be a valid Lisp s-expression.

For details of how to form s-expressions elfeed-score will understand, see below.