0

I have an org-file which might look like the following:

* Appointments
** Meet someone important
<2018-02-15 Thu 08:00-09:00>

* Discussions
** TODO Discuss something with someone
    SCHEDULED: <2018-02-15 Thu 08:00-09:00>

Generating the agenda results in something like

8:00-9:00 Scheduled: TODO Discuss something with someone
8:00-9:00 Meet someone important

Is there a simple way to change the sorting of the agenda to sort entries with a plain time stamp before scheduled items, that is I would the agenda prefer to look like

8:00-9:00 Meet someone important
8:00-9:00 Scheduled: TODO Discuss something with someone

I had a look at the documentation for org-agenda-sorting-strategy but this looked quite complicated and I could not figure out how to achieve the desired result.

1

It's a little hard to figure out org-agenda-sorting-strategy the first time around. If you look at the value (say, with C-h v), it's a list of lists. The individual lists describe the sorting to be used in a specific "context", like agenda or todo for different kinds of agenda views.

The default value is:

((agenda habit-down time-up priority-down category-keep)
  (todo priority-down category-keep)
  (tags priority-down category-keep)
  (search category-keep))

So for the agenda view, it will sort first to put habits at the end (that's what the -down means for it), then entries with time of day first, priority in decreasing order, and keep the default order of categories.

So what you want sounds like ts-up, to keep active timestamps early first. Therefore, we want the first value to look like:

(agenda ts-up habit-down time-up priority-down category-keep)

The easiest way is to customize the variable and add the ts-up there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["<li class=\"-item\"><a href=\"https://www.facebook.com/officialstackoverflow/\" class=\"-link\">Facebook</a></li>\r\n                    <li class=\"-item\"><a href=\"https://twitter.com/stackoverflow\" class=\"-link\">Twitter</a></li>\r\n                    <li class=\"-item\"><a href=\"https://linkedin.com/company/stack-overflow\" class=\"-link\">LinkedIn</a></li>\r\n                </ul>\r\n\r\n                <p class=\"mt-auto mb24\">\r\nsite design / logo &#169; 2019 Stack Exchange Inc; user contributions licensed under <a href=\"https://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a>\r\n                            with <a href=\"https://stackoverflow.blog/2009/06/25/attribution-required/\" rel=\"license\">attribution required</a>.\r\n                    <span id=\"svnrev\">rev&nbsp;2019.8.16.34633</span>\r\n                </p>\r\n            </div>\r\n        </div>\r\n\r\n            </footer>\r\n            <script>StackExchange.ready(function () { StackExchange.responsiveness.addSwitcher(); })</script>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Emacs Stack Exchange w"], "copyright__copyright__copyright": ["ep the default order of categories.\n\nSo what you want sounds like ts-up, to keep active timestamps early first. Therefore, we want the first value to look like:\n\n(agenda ts-up habit-down time-up priority-down category-keep)\n\nThe easiest way is to customize the variable and add the ts-up there.\n\nYour Answer\n\nBy clicking \u201cPost Your Answer\u201d, you agree to our terms of service, privacy policy and cookie policy\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}