mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-28 07:44:49 +00:00
org-agenda: Fix nil-nil comparison in tags and alpha
* lisp/org-agenda.el (org-cmp-alpha): (org-cmp-tag): Don't favor a particular ordering when both lhs and rhs are nil.
This commit is contained in:
parent
cebd6417b2
commit
116a58b368
@ -6990,7 +6990,8 @@ The optional argument TYPE tells the agenda type."
|
||||
"\\([ \t]*\\[[a-zA-Z0-9]\\]\\)? *") tb)
|
||||
(setq tb (substring tb (match-end 0))))
|
||||
(setq tb (downcase tb)))
|
||||
(cond ((not ta) +1)
|
||||
(cond ((not (or ta tb)) nil)
|
||||
((not ta) +1)
|
||||
((not tb) -1)
|
||||
((string-lessp ta tb) -1)
|
||||
((string-lessp tb ta) +1))))
|
||||
@ -6999,7 +7000,8 @@ The optional argument TYPE tells the agenda type."
|
||||
"Compare the string values of the first tags of A and B."
|
||||
(let ((ta (car (last (get-text-property 1 'tags a))))
|
||||
(tb (car (last (get-text-property 1 'tags b)))))
|
||||
(cond ((not ta) +1)
|
||||
(cond ((not (or ta tb)) nil)
|
||||
((not ta) +1)
|
||||
((not tb) -1)
|
||||
((string-lessp ta tb) -1)
|
||||
((string-lessp tb ta) +1))))
|
||||
|
Loading…
Reference in New Issue
Block a user