emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] Testing: Add tests for `org-tags-sort-function'


From: Morgan Smith
Subject: Re: [PATCH] Testing: Add tests for `org-tags-sort-function'
Date: Tue, 10 Dec 2024 19:05:12 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

Hello!

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

> Ihor Radchenko <yantar92@posteo.net> 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.

Attachment: 0001-Testing-Add-tests-for-org-tags-sort-function.patch
Description: Text Data


reply via email to

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