Hello! Morgan Smith writes: > Ihor Radchenko writes: >>> + ;; TODO: a value of `nil' sorts it! That's not what the >>> + ;; defcustom :type of `org-tags-sort-function' says! It >>> + ;; says "No sorting". >> >> Right. When sort function is not set agenda specifically (but not other >> users of org-tags-sort-function) falls back to alphabetical sorting. > > As far as I can tell the only place where it doesn't fall back is in > `org-set-tags'. > >> In fact, the docstring does not at all mention that >> `org-tags-sort-function' is honored at all: >> >> (defcustom org-agenda-sorting-strategy ... >> ... >> tag-up Sort alphabetically by last tag, A-Z. >> tag-down Sort alphabetically by last tag, Z-A. >> >> We need to fix this docstring documenting `org-tags-sort-function', I think. > > I don't understand what is happening in `org-entries-lessp' or how it > even manages to use `org-agenda-sorting-strategy' so I'm going to > refrain from trying to document things I don't understand. I've polished the patch slightly but it's almost identical to what I submitted before. There is one remaining issue as you can see above but I'm trying my best to ignore it. I believe this patch can be applied before the issue is fixed. I would like this patch to be accepted so I can build off of it to submit another patch that includes an alternative function to set `org-tags-sort-function' to.