elfeed icon indicating copy to clipboard operation
elfeed copied to clipboard

Chronological feed view, by elfeed-search

Open butter-radish opened this issue 1 year ago • 3 comments

Is there a way to flip the feed into a reverse-chronological order (in the Elfeed-Search mode)? I can't find anything for this in §'Filter syntax' in the README.

If we could order entries reverse-chronologically in Elfeed-Search, pressing 'n' inside Elfeed-Show buffers could move to the next entry chronologically. Parsing feed entries chronologically can be useful, especially in social media feeds—Twitter, Mastodon, Instagram, et al.

butter-radish avatar Apr 11 '23 09:04 butter-radish

butter-radish @.***> writes:

Is there a way to flip the feed into a reverse-chronological order (in the Elfeed-Search mode)? I can't find anything for this in §'Filter syntax' in the README.

If we could order entries reverse-chronologically in Elfeed-Search, pressing 'n' inside Elfeed-Show buffers could move to the next entry chronologically. Parsing feed entries chronologically can be useful, especially in social media feeds—Twitter, Mastodon, Instagram, et al.

Take a look at elfeed-search-sort-function?

-- Michael @.***>

sp1ff avatar Apr 19 '23 15:04 sp1ff

I had your same problem and this works (copy into the init file):

(defun my/elfeed-search-sort--feed-url (a b) (>= (elfeed-entry-date a) (elfeed-entry-date b)))

then customise elfeed-search-sort-function to be: my/elfeed-search-sort--feed-url

Close this issue?

user86940 avatar Mar 25 '24 16:03 user86940

Sorry, I’d mixed it up while writing the issue, I wanted the reverse of what Elfeed does by default—I suppose now that would be a chronological feed view.

Switching the function in your code gets me that, thank you @user86940! And you too @sp1ff, even though I didn’t understand what you meant back then.

(defun my/elfeed-search-sort--feed-url (a b)
  (<=
   (elfeed-entry-date a)
   (elfeed-entry-date b)))

But I don’t want to have it chronological all the time, the default reverse-chronological sorting works for most things; it’s only for a few things that I want the opposite. So I’d like to be able to easily toggle it, like with a ‘elfeed-search-live-filter’ (‘s’) search. “@​1-week” reverse-chronologically sorts all the entries from the past week, maybe some other operator instead of ‘@’ prefixing the duration could list all the entries from that period chronologically.

butter-radish avatar Apr 12 '24 20:04 butter-radish