Filter Syntax
To make tags useful, the Elfeed entry listing buffer can be filtered by tags. Use ‘elfeed-search-set-filter’ (or s) to update the filter. Use ‘elfeed-search-clear-filter’ to restore the default.
Any component of the search string beginning with a ‘+’ or a ‘-’ is treated like a tag. ‘+’ means the tag is required, ‘-’ means the tag must not be present.
A component beginning with a ‘@’ indicates an age or a date range. An age is a relative time expression or an absolute date expression. Entries older than this age are filtered out. The age description accepts plain English, but cannot have spaces, so use dashes. For example, ‘@2-years-old’, ‘@3-days-ago’ or ‘@2019-06-24’. The dashes and suffixes like ‘-old’ are ignored, such that you can use a shorter form , e.g., ‘@2years’. A date range are two ages separated by a ‘--’ e.g., ‘@2019-06-20--2019-06-24’ or ‘@5-days-ago--1-day-ago’. The entry must be newer than the first expression but older than the second. The database is date-oriented, so filters that include an age restriction are significantly more efficient.
A component beginning with a ‘!’ is treated as an "inverse" regular expression. This means that any entry matching this regular expression will be filtered out. The regular expression begins after the ‘!’ character. You can read this as "entry not matching ‘foo’".
A component beginning with a ‘#’ limits the total number of entries displayed to the number immediately following the symbol. For example, to limit the display to 20 entries: ‘#20’.
A component beginning with a = is a regular expression matching the entry’s feed (title or URL). Only entries belonging to a feed that matches at least one of the = expressions will be shown.
A component beginning with a ‘~’ is a regular expression matching the entry’s feed (title or URL). Only entries belonging to a feed that matches none of the ‘~’ expressions will be shown.
All other components are treated as a regular expression, and only entries matching it (title or URL) will be shown.
Here are some example filters.
- ‘
@6months +unread’
Only show unread entries of the last six months. This is the default filter.
- ‘
linu[xs] @1-year-old’
Only show entries about Linux or Linus from the last year.
- ‘
-unread +youtube #10’
Only show the most recent 10 previously-read entries tagged as ‘youtube’.
- ‘
+unread !x?emacs’
Only show unread entries not having ‘emacs’ or ‘xemacs’ in the title or link.
- ‘
+emacs =https://example.org/feed/’
Only show entries tagged as ‘emacs’ from a specific feed.