I'm having trouble sorting my agenda view. I want to display entries
from multiple files, sorted only by the inactive timestamp for each
entry, in reverse chronological order.
This is my config for agenda entries:
(("n" "Agenda and all TODOs" ((agenda #1="" nil) (alltodo #1# nil))
nil)
("i" "My reverse chronological view" alltodo ""
((org-agenda-files
'("/home/kuba/Downloads/org-repro/file1.org"
"/home/kuba/Downloads/org-repro/file2.org"))
(org-agenda-sorting-strategy '(timestamp-down)))))
file1.org contents:
* TODO DAY 1 Morning
[2025-04-01 wto 9:00]
* TODO DAY 1 Evening
[2025-04-01 wto 19:00]
file2.org contents:
* TODO DAY 1 Noon
[2025-04-01 wto 12:00]
* TODO DAY 2 Noon
[2025-04-02 wto 12:00]
When I display the custom agenda, it displays:
Press ‘N r’ (e.g. ‘0 r’) to search again: (0)[ALL$
file2: TODO DAY 2 Noon
file1: TODO DAY 1 Morning
file1: TODO DAY 1 Evening
file2: TODO DAY 1 Noon
You can see that the order is wrong: the bottom two entries should be
swapped. It seems that somehow the entries are sorted first by day
(ignoring the hour), and then by the name of the file they come from?
It's totally unexpected for me and I'm not sure how to just make the
sorting work the way I'd expect, so just reverse chronological order
based on inactive timestamps, and ignore everything else.
Any hints on how to achieve the desired results would be very welcome!