emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] lisp/org.el: Add ability to sort tags by hierarchy


From: Ihor Radchenko
Subject: Re: [PATCH] lisp/org.el: Add ability to sort tags by hierarchy
Date: Sat, 15 Jun 2024 14:25:40 +0000

Morgan Smith <Morgan.J.Smith@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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]