[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] Faulty logic in org-cmp-tag/alpha
From: |
Carlos Pita |
Subject: |
[O] [PATCH] Faulty logic in org-cmp-tag/alpha |
Date: |
Sat, 9 Mar 2019 17:55:41 -0300 |
Hi all,
there is a problem in this kind of logic:
(cond ((not ta) +1)
((not tb) -1)
((string-lessp ta tb) -1)
((string-lessp tb ta) +1))))
in that when both ta and tb are nil then they are arbitrarily sorted.
Since the agenda sorting strategy is lexicographic this logic
virtually invalidates any strategy that puts tag or alpha first, v.g.
'(tag-up priority-down).
I've attached a patch returning nil when both ta and tb are nil so as
to fallback to the next sorting criterion without favoring lhs nor
rhs.
AFAICS this only affects tag and alpha comparators.
Best regards
--
Carlos
0001-Compare-nil-nil-as-nil-so-as-not-to-change-lexicogra.patch
Description: Text Data
- [O] [PATCH] Faulty logic in org-cmp-tag/alpha,
Carlos Pita <=