[Remind-Fans] Using SPECIAL COLOR in the agenda view?

Tim Chase remind at tim.thechases.com
Fri Jan 24 11:46:59 EST 2020


On 2020-01-24 10:37, Dianne Skoll wrote:
> On 2020-01-23 19:32, Tim Chase wrote:
> > If I create an event like
> >   REM Jan SPECIAL COLOR 255 0 255 Bright magenta January!  
> >   $ rem 2020-1-20  
> > it doesn't colorize my agenda-view output.  
> 
> Yes.  The COLOR special is currently only supported by calendar
> back-ends. I'll look into making it supported in "agenda mode"
> (thanks for naming that mode, by the way... I always thought of it
> as "normal mode").

Hah, I've been in the process of writing up a huge blog post on
remind, and that was the best name I could come up with for this
view to distinguish it from the week/month views.  Glad it's helpful
nomenclature.

> We're running out of option letters, though. :)  The only unused one
> is "-u", so I guess that will be the option for coloring reminders
> in agenda mode (and probably calendar mode too for consistency.)

Ah, good ol' "coloUr" mnemonic for "-u" then? ;-)
                  ~

Thanks for considering the possibility.  I'm not sure how it should
integrate with things like msgprefix/msgsuffix.  Should the whole line
of output (prefix+body+suffix) get colorized?  Or just the reminder
body?  Thinking of cases like

  FSET msgprefix(p) iif(p > $DefaultPrio, Red + "****" + Nrm, "")

[rambling warning ;-) ]

I've played with various scenarios and find pros & cons with each of
them.  The least-bad version (in my head) emitted the color before
each of those segments, something like (pseudocode)

  if colorize_agenda {
    emit_ansi_color_sequence(current_color)
  }
  do_msg_prefix()
  if color_agenda {
    emit_ansi_color_sequence(current_color)
  }
  do_message_body()
  if color_agenda {
    emit_ansi_color_sequence(current_color)
  }
  do_msg_suffix()

While it feels a bit redundant, it still allows for ANSI sequences in
each part (prefix/body/suffix), and the recently-added $DefaultColor
stuff makes for a sensible reset.

[end ramble. at least for now]

Thanks again!

-tim




-tim






More information about the Remind-fans mailing list