Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chronological feed view, by elfeed-search #485

Open
butter-radish opened this issue Apr 11, 2023 · 3 comments
Open

Chronological feed view, by elfeed-search #485

butter-radish opened this issue Apr 11, 2023 · 3 comments

Comments

@butter-radish
Copy link

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.

@sp1ff
Copy link

sp1ff commented Apr 19, 2023 via email

@user86940
Copy link

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?

@butter-radish
Copy link
Author

butter-radish commented Apr 12, 2024

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 butter-radish changed the title Reverse chronological feed view Chronological feed view, by elfeed-search Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants