Allow "COMPLETED-THROUGH" as a synonym for COMPLETE-THROUGH.

This commit is contained in:
Dianne Skoll
2025-12-30 11:52:25 -05:00
parent 6d4c38126e
commit 34c864a38c
5 changed files with 60 additions and 5 deletions

View File

@@ -110,7 +110,7 @@
(defconst remind-keywords
(sort
(list "ADDOMIT" "AFTER" "AT" "BAN" "BANNER" "BEFORE" "CAL" "CLEAR"
"CLEAR-OMIT-CONTEXT" "COMPLETE-THROUGH" "DEBUG" "DO" "DUMP" "DUMPVARS"
"CLEAR-OMIT-CONTEXT" "COMPLETE-THROUGH" "COMPLETED-THROUGH" "DEBUG" "DO" "DUMP" "DUMPVARS"
"DURATION" "ELSE" "ENDIF" "ERRMSG" "EXIT" "EXPR" "FIRST"
"FLUSH" "FOURTH" "FRENAME" "FROM" "FSET" "FUNSET" "IF"
"IFTRIG" "IN" "INC" "INCLUDE" "INCLUDECMD" "INFO" "LAST"

View File

@@ -1995,6 +1995,7 @@ reminding you of your 2027 taxes (starting 15 days before the due
date.)
.PP
It is an error to specify COMPLETE-THROUGH without also specifying TODO.
The keyword COMPLETED-THROUGH may be used as a synonym for COMPLETE-THROUGH.
.PP
.SH LIMITING REMINDERS ABOUT OVERDUE TODOS
.PP

View File

@@ -48,6 +48,7 @@ Token TokArray[] = {
{ "cal", 3, T_RemType, CAL_TYPE },
{ "clear-omit-context", 5, T_Clr, 0 },
{ "complete-through", 16, T_CompleteThrough, 0 },
{ "completed-through", 17, T_CompleteThrough, 0 },
{ "debug", 5, T_Debug, 0 },
{ "december", 3, T_Month, 11 },
{ "do", 2, T_IncludeR, 0 },

View File

@@ -24590,6 +24590,7 @@ cal
clear
clear-omit-context
complete-through
completed-through
debug
do
dump
@@ -39773,6 +39774,14 @@ Fifth today
Sixth on 2025-08-06
Eighth on 2025-08-20
Ninth today
First on 2025-08-01
Second on 2022-08-01
Third on 2023-08-01
Fourth on 2025-08-20
Fifth today
Sixth on 2025-08-06
Eighth on 2025-08-20
Ninth today
Yup today
Yup2 yesterday
Yup3 on 2025-08-11
@@ -39788,6 +39797,13 @@ Testing TODOS in calendar mode
2025/08/01 * * * * First
2025/08/01 * * * * Second
2025/08/01 * * * * Third
2025/08/01 * * * * First
2025/08/01 * * * * Second
2025/08/01 * * * * Third
2025/08/06 * * * * Sixth
2025/08/06 * * * * Seventh
2025/08/06 * * * * Eighth
2025/08/06 * * * * Ninth
2025/08/06 * * * * Sixth
2025/08/06 * * * * Seventh
2025/08/06 * * * * Eighth
@@ -39799,10 +39815,18 @@ Testing TODOS in calendar mode
2025/08/13 * * * * Fifth
2025/08/13 * * * * Eighth
2025/08/13 * * * * Ninth
2025/08/13 * * * * Fifth
2025/08/13 * * * * Eighth
2025/08/13 * * * * Ninth
2025/08/13 * * * * Yup
2025/08/20 * * * * Fourth
2025/08/20 * * * * Eighth
2025/08/20 * * * * Ninth
2025/08/20 * * * * Fourth
2025/08/20 * * * * Eighth
2025/08/20 * * * * Ninth
2025/08/27 * * * * Eighth
2025/08/27 * * * * Ninth
2025/08/27 * * * * Eighth
2025/08/27 * * * * Ninth
@@ -39810,6 +39834,10 @@ Testing TODOS in calendar mode with completed todos hidden
2025/08/01 * * * * First
2025/08/01 * * * * Second
2025/08/01 * * * * Third
2025/08/01 * * * * First
2025/08/01 * * * * Second
2025/08/01 * * * * Third
2025/08/06 * * * * Sixth
2025/08/06 * * * * Sixth
2025/08/09 * * * * Nope
2025/08/10 * * * * Yup4
@@ -39817,10 +39845,17 @@ Testing TODOS in calendar mode with completed todos hidden
2025/08/12 * * * * Yup2
2025/08/13 * * * * Fifth
2025/08/13 * * * * Ninth
2025/08/13 * * * * Fifth
2025/08/13 * * * * Ninth
2025/08/13 * * * * Yup
2025/08/20 * * * * Fourth
2025/08/20 * * * * Eighth
2025/08/20 * * * * Ninth
2025/08/20 * * * * Fourth
2025/08/20 * * * * Eighth
2025/08/20 * * * * Ninth
2025/08/27 * * * * Eighth
2025/08/27 * * * * Ninth
2025/08/27 * * * * Eighth
2025/08/27 * * * * Ninth
Testing TODOS and JSON mode
@@ -39833,10 +39868,18 @@ Testing TODOS and JSON mode
{"date":"2025-08-06","filename":"../tests/todos.rem","lineno":9,"d":6,"m":8,"y":2025,"is_todo":1,"delta":7,"trigbase":"2025-08-6 ","priority":5000,"body":"Sixth on 2025-08-06"},
{"date":"2025-08-20","filename":"../tests/todos.rem","lineno":11,"wd":["Wednesday"],"is_todo":1,"complete_through":"2025-08-13","delta":7,"priority":5000,"body":"Eighth on 2025-08-20"},
{"date":"2025-08-13","filename":"../tests/todos.rem","lineno":12,"wd":["Wednesday"],"is_todo":1,"complete_through":"2025-08-12","delta":7,"priority":5000,"body":"Ninth today"},
{"date":"2025-08-13","filename":"../tests/todos.rem","lineno":15,"d":13,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-13","max_overdue":3,"priority":5000,"body":"Yup today"},
{"date":"2025-08-12","filename":"../tests/todos.rem","lineno":16,"d":12,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-12","max_overdue":3,"priority":5000,"body":"Yup2 yesterday"},
{"date":"2025-08-11","filename":"../tests/todos.rem","lineno":17,"d":11,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-11","max_overdue":3,"priority":5000,"body":"Yup3 on 2025-08-11"},
{"date":"2025-08-10","filename":"../tests/todos.rem","lineno":18,"d":10,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-10","max_overdue":3,"priority":5000,"body":"Yup4 on 2025-08-10"}
{"date":"2025-08-01","filename":"../tests/todos.rem","lineno":14,"d":1,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-1 ","priority":5000,"body":"First on 2025-08-01"},
{"date":"2022-08-01","filename":"../tests/todos.rem","lineno":15,"d":1,"m":8,"is_todo":1,"complete_through":"2022-07-31","priority":5000,"body":"Second on 2022-08-01"},
{"date":"2023-08-01","filename":"../tests/todos.rem","lineno":16,"d":1,"m":8,"is_todo":1,"complete_through":"2022-08-01","priority":5000,"body":"Third on 2023-08-01"},
{"date":"2025-08-20","filename":"../tests/todos.rem","lineno":17,"d":20,"m":8,"y":2025,"is_todo":1,"delta":7,"trigbase":"2025-08-20","priority":5000,"body":"Fourth on 2025-08-20"},
{"date":"2025-08-13","filename":"../tests/todos.rem","lineno":18,"d":13,"m":8,"y":2025,"is_todo":1,"delta":7,"trigbase":"2025-08-13","priority":5000,"body":"Fifth today"},
{"date":"2025-08-06","filename":"../tests/todos.rem","lineno":19,"d":6,"m":8,"y":2025,"is_todo":1,"delta":7,"trigbase":"2025-08-6 ","priority":5000,"body":"Sixth on 2025-08-06"},
{"date":"2025-08-20","filename":"../tests/todos.rem","lineno":21,"wd":["Wednesday"],"is_todo":1,"complete_through":"2025-08-13","delta":7,"priority":5000,"body":"Eighth on 2025-08-20"},
{"date":"2025-08-13","filename":"../tests/todos.rem","lineno":22,"wd":["Wednesday"],"is_todo":1,"complete_through":"2025-08-12","delta":7,"priority":5000,"body":"Ninth today"},
{"date":"2025-08-13","filename":"../tests/todos.rem","lineno":25,"d":13,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-13","max_overdue":3,"priority":5000,"body":"Yup today"},
{"date":"2025-08-12","filename":"../tests/todos.rem","lineno":26,"d":12,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-12","max_overdue":3,"priority":5000,"body":"Yup2 yesterday"},
{"date":"2025-08-11","filename":"../tests/todos.rem","lineno":27,"d":11,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-11","max_overdue":3,"priority":5000,"body":"Yup3 on 2025-08-11"},
{"date":"2025-08-10","filename":"../tests/todos.rem","lineno":28,"d":10,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-10","max_overdue":3,"priority":5000,"body":"Yup4 on 2025-08-10"}
]
Testing proper redirection of RUN stdout in JSON mode... here's stdout
[

View File

@@ -11,6 +11,16 @@ REM TODO COMPLETE-THROUGH 2025-08-06 6 Aug 2025 +7 MSG %"Seventh%" %l
REM TODO Wed +7 COMPLETE-THROUGH 2025-08-13 MSG %"Eighth%" %l
REM TODO Wed +7 COMPLETE-THROUGH 2025-08-12 MSG %"Ninth%" %l
REM TODO 1 Aug 2025 MSG %"First%" %l
REM TODO 1 Aug COMPLETED-THROUGH 2022-07-31 MSG %"Second%" %l
REM TODO 1 Aug COMPLETED-THROUGH 2022-08-01 MSG %"Third%" %l
REM TODO 20 Aug 2025 +7 MSG %"Fourth%" %l
REM TODO 13 Aug 2025 +7 MSG %"Fifth%" %l
REM TODO 6 Aug 2025 +7 MSG %"Sixth%" %l
REM TODO COMPLETED-THROUGH 2025-08-06 6 Aug 2025 +7 MSG %"Seventh%" %l
REM TODO Wed +7 COMPLETED-THROUGH 2025-08-13 MSG %"Eighth%" %l
REM TODO Wed +7 COMPLETED-THROUGH 2025-08-12 MSG %"Ninth%" %l
# Test MAX-OVERDUE
REM TODO 2025-08-13 MAX-OVERDUE 3 MSG %"Yup%" %l
REM TODO 2025-08-12 MAX-OVERDUE 3 MSG %"Yup2%" %l