Metadata Plist
All feed and entry objects have plist where you can store your own arbitrary, readable values. These values are automatically persisted in the database. This metadata is accessed using the polymorphic ‘elfeed-meta’ function. The function is a generalized variable, such that it is ‘setf’-able. The macro ‘setf’ must have access to the definition of ‘elfeed-meta’ at compile time. Therefore you must add a ‘(require 'elfeed)’ at the top level, such that the Elisp byte compiler loads the definition.
(require 'elfeed) ;; Necessary for macro expansion of (setf (elfeed-meta ...) ...)
(setf (elfeed-meta entry :rating) 4)
(elfeed-meta entry :rating)
;; => 4
(setf (elfeed-meta feed :title) "My Better Title")Elfeed itself adds some entries to this plist, some for your use, some for its own use. Here are the properties that Elfeed uses:
- ‘
:authors’ : A list of author plists (‘:name’, ‘:uri’, ‘:email’). - ‘
:canonical-url’ : The final URL for the feed after all redirects. - ‘
:categories’ : The feed-supplied categories for this entry. - ‘
:etag’ : HTTP Etag header, for conditional GETs. - ‘
:failures’ : Number of times this feed has failed to update. - ‘
:last-modified’ : HTTP Last-Modified header, for conditional GETs. - ‘
:title’ : Overrides the feed-supplied title for display purposes, both for feeds and entries. See also ‘elfeed-search-set-feed-title’ and ‘elfeed-search-set-entry-title’. - ‘
:link-content’ : The HTML content fetched from the entry link, see ‘elfeed-show-fetch-link’.
This list will grow in time, so you might consider namespacing your own properties to avoid collisions (e.g. ‘:xyz/rating’), or simply not using keywords as keys. Elfeed will always use keywords without a slash.