Morgan Smith <morgan.j.sm...@outlook.com> writes: > * lisp/org.el (org-tags-sort-hierarchy): New function. > (org-tags-sort-function): Add new function to type. > * testing/lisp/test-org.el (test-org/tags-sort-hierarchy): New test > --- > > This is one of those things that I thought would be easy but then ended up > hard. > > I wrote this so that items in my agenda would sort nicely. Items tagged in > the > same hierarchy would end up next to each other.
> + "Sort tags TAG1 and TAG2 by the tag hierarchy. > +Sorting is done alphabetically. This function is intended to be a value > +of `org-tags-sort-function'." Thanks for the patch, but may you please elaborate what kind of sorting order does your function imply? In particular, I am wondering about the ordering of tags from different groups? Also, what happens when there are no tag groups defined? (These questions should be answered in the docstring and the etc/ORG-NEWS entry you need to add, announcing the new feature) Also, sorting may not be alphabetical, depending on the value of `org-sort-function'. -- Ihor Radchenko // yantar92, Org mode contributor, 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>