krz/orgstar

A native macOS editor for org-mode files. editor org-mode swift

Commit d2c4913a70

d2c4913a70cc9cc431a2025f090a42a08f74cbdb

parent: 3f1506d171

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-08 03:31 UTC

Check date <> matches against Emacs

org-time<> in Org 9.8.7 compares with =; the oracle now covers <>,
!= and /= on DEADLINE, SCHEDULED, TIMESTAMP and a date property.

Layout: unified · split

Sources/OrgCore/Agenda/AgendaSearch.swift +3 −1
@@ -231,7 +231,9 @@ public struct TagsMatcher: Sendable {
231231 let a = Self.seconds(actual, now: now, calendar: calendar)
232232 let b = Self.matcherTime(time, now: now, calendar: calendar)
233233 guard a > 0, b > 0 else { return false }
234 // `org-time<>` compares with `=`.
234 // `org-time<>` in Org 9.8.7 (org-macs.el) is `(\= a b)`, which reads as `=`:
235 // `DEADLINE<>"<2026-10-07>"` keeps the entries due that day.
236 // AgendaTests.listsMatchEmacs checks this against Emacs.
235237 return op == "<>" || op == "!=" || op == "/=" ? a == b : Self.compare(op, a, b)
236238 }
237239 }
Tests/OrgCoreTests/AgendaTests.swift +3
@@ -287,6 +287,9 @@ struct AgendaTests {
287287 "CATEGORY=\"cat\"", "DUE<\"<2026-10-15>\"", "DUE>\"<today>\"", "SCHEDULED<\"<today>\"", "TIMESTAMP=\"<2026-10-03 Sat>\"",
288288 "ITEM={lph}", "work/TODO", "/!", "+work/!TODO|WAIT", "EFFORT>\"1:00\"", "ALLTAGS={proj}", "TAGS=\":work:urgent:\"",
289289 "x@y", "/-TODO", "/!{^[HW]}", "work&urgent", "SIZE>=3+SIZE<=3", "LEVEL<>1",
290 // `org-time<>` is `=` in Org 9.8.7.
291 "DUE<>\"<2026-10-10>\"", "DUE<>\"<2026-10-11>\"", "SCHEDULED<>\"<2026-09-30>\"", "TIMESTAMP!=\"<2026-10-03 Sat>\"",
292 "DEADLINE/=\"<2026-10-05>\"", "DEADLINE<>\"<2026-10-07>\"",
290293 ]
291294
292295 @Test(.enabled(if: ProcessInfo.processInfo.environment["ORGSTAR_SKIP_ORACLE"] == nil))