My problem is with two of my main use-cases for time-stamped items (essentially events). Consider these two org-mode items:

 * Clojure Dojo at uSwitch <2016-11-14 Mon 19:00>
 * Trip to Jamaica <2016-12-14 Wed>-<2017-01-02 Mon>

For the first item, simple date+time stamped events appear in the agenda on the top in the time-scale view of the day.

I use multi-day duration events for the purpose to remind me major contexts (like being abroad, on holiday, etc.), based on which I might have to adjust my priorities for those days.

My question is, how can I sort the agenda items, so that all-day events (including multi-day duration) are on top of the agenda?

Whether the all-day/multi-day items should appear above the daily time-scale, or below, is not important. Actually, I would look forward to look at both if possible.

I was told to look into the org-agenda-sorting-strategy option, and write a user defined function for it. I would like to ask for an example elisp code to achieves the above.

Might worth noting that I am mostly using day view agenda. Not sure how such changes could affect the yearly, monthly, or other agenda views...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.