Morgan Smith <morgan.j.sm...@outlook.com> writes:

> I hit a roadblock trying to figure out how best to implement your
> suggestion.
>
> After running something like this:
>
> (setopt org-tags-sort-function (org-tags-sort-hierarchy-by
>                                 org-sort-function))
>
> The help buffer for `org-tags-sort-function' displays a lambda as the
> value which isn't very helpful.  It also isn't conducive to users using
> the customize interface (I think?  I'm not going to pretend I actually
> use that thing).
> ...
> Maybe I'm thinking too hard about this but it feels to me like it should
> be a solved problem.  How would you do this?

Hmm. I think we can do it differently.
Rather than trying to do secondary sorting in
`org-tags-sort-hierarchy...' we can allow `org-tags-sort-function' to be
a list of functions. Then, when sorting, if (sort-function a b) and
(sort-function b a) return the same value (which means that a=b wrt a
given sort-function), we try second sort function in the list, and so
on.

It will be (1) more universal; (2) follow our existing practice in
`org-agenda-sorting-strategy'.

WDYT?

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to