[Remind-Fans] Determining if -@ was passed?

Tim Chase remind at tim.thechases.com
Sun Oct 9 09:28:53 EDT 2022


Is there a way for a reminder file to determine of -@ was passed
on the command-line?  Historically, I've provided this as redundant
information via an alias:

  rem -iCOLOR=2 - at 2 ...

but it would be helpful if there was some system-variable that gave
me access to that information.

While I'm pipe-dreaming, is there any chance to expose the internal
"convert an RGB triple to its corresponding ANSI sequence" functions?
One of my hacks has been to have color triples stored as strings like

  SET Purple "58 0 82"

and then a color function c() that converts it to the corresponding
ANSI sequence for the specified color-depth, letting me do things
like

  REM Oct 9 2022 MSG This is [c(Purple)]Purple text[c($DefaultColor)]?

The definition of that c() varies based on whether I've defined a
COLOR variable, and if so, what its color-depth value is (I have
convert-to-16color-ANSI and convert-to-24-bit-color-ANSI because
those are the defaults in the main terminals I use, so I haven't
done the 256-color-ANSI version yet).  But because those are Remind
functions, they are, *coughs* suboptimal to say the least.  And
they don't take into consideration the lighten-on-dark-backgrounds
and darken-on-light-backgrounds logic you have.

So in my fantasy world, I'd have the ability to rip out all my
reminder code that parallels stuff that Remind is already
tracking/providing internally.

Any chance?  I'm open to spelunking in code again and attempting
to implement them myself if they sound like useful improvements.

-Tim


More information about the Remind-fans mailing list