[Remind-Fans] Inherent meaning to PRIORITY values?
Tim Chase
remind at tim.thechases.com
Wed Aug 28 10:45:30 EDT 2024
Howdy, y'all,
It occurred to me today that I don't remember giving much thought
to the PRIORITY values assigned.
I know the default ($DefaultPrio) is 5000, in the middle of the
0-to-9999 range.
It occurred to me today that sorting with -g defaults to sorting
priorty *ascending* which meant that my "high priority" items (>5000)
were sorting *below* my lower-priority items.
It's easy enough to tweak my shell-aliases so that they uses -gaada
instead of the default "aaaa", but it occurred to me that I might
have mistakenly inverted what the priority-number means.
It's not too complex for me to switch since I define some constants
SET PRIO_LOWEST 0
SET PRIO_LOW 3000
SET PRIO_HIGH 8000
SET PRIO_HIGHEST 9999
SET IMPORTANT "PRIORITY " + PRIO_HIGH
and then use things like
REM Apr 1 [IMPORTANT] MSG Don't get fooled
throughout my reminder files. And there are a couple places like
my msgprefix() where that priority is compared to set prefix
colors[1] based on whether a task is low/high priority.
Does remind make any internal assumptions on whether 0 or 9999 is
"high priority"?
Thanks!
-tim
[1]
this family of functions in case anybody wants to play them, or
y'all have any critiques. The goal is to have my agenda-view emit
things like
WORK: Call with client
where the prefix comes from the filename in which the reminder was
stored ("work.rem"), and it's red if it's important (bright red if
it's the current day in question; I might need to change this to
compare with realtoday() instead), or gray if it's low-priority.
SET remind_dir getenv("HOME") + "path/to/reminders/"
# returns the uppercase filename sans-extension: foo.rem -> FOO
FSET fileprefix(x) upper( \
substr(filename(), \
strlen(remind_dir)+1, \
strlen(filename())-4 \
) \
)
FSET prefixcolor(x) iif( \
x > $DefaultPrio, \
iif($U == $T, ansicolor(BrRed), ansicolor(Red)), \
iif(x < $DefaultPrio, ansicolor(Gry), ansicolor(Wht)) \
)
FSET msgprefix(x) \
prefixcolor(x) + \
fileprefix(x) + \
": " + \
ansicolor($DefaultColor)
More information about the Remind-fans
mailing list