emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

specific coloring of diary calendar entries


From: Ami Fischman
Subject: specific coloring of diary calendar entries
Date: Wed, 11 Dec 2002 15:58:37 -0800
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2.50 (i686-pc-linux-gnu)

[apologies if this appears twice; attempted posting two days ago, but the
 post never appeared on the list]

Attached are two patches that make it possible to specify a color for a
diary entry in the entry itself.  This is done via "color tags" -- a string
that looks like "[color:blue]" (without the quotes, and blue can be any
standard X color).  This color comes out both in the calendar display
(dates are colored according to the events in them) and in the fancy diary
display (entries are colored according to their specifications).

The first entry matching a date is the one that determines the color for
that date (so order DOES matter in ~/.diary files now).  The color tag MUST
appear at the end of a line (nothing other than a newline may follow it),
and if one has a multi-line non-sexp entry, the color tag may appear on the
first line of the entry.  On multi-line sexp entries, the color tag may
appear on any line in the sexp, at the end of the line.

To tag all entries that don't have their own color tags, one may have a
"global file color" specified: the first line in a file consisting of the
string "# [color:lightgrey]" (without the double quotes) determines the
color, and the entries in that file will default to that color.

If a date matches more than one entry, the FIRST matching entry's color is
used for the date.  Regular entries get marked before sexp ones, so their
colors always show up instead of sexp ones (which jives with the notion
that sexp events are "generic" whereas regular entries are "specific" and
so more attention-deserving).

This solves a long-time wish of mine to be able to give "subtler" colors to
less important events and glaring colors to events that demand my attention.
It also solves a request of Kai Grossjohann for #include'd entry coloring,
and hopefully makes diary/calendar modes a more attractive alternative for
group-wide #include'd diary files.

If there are no objections to the code (there may be; my lisp is very
rusty), I'd like to see it committed to CVS.  Any comments happily accepted.

Cheers,
-- 
  Ami Fischman
  address@hidden

Attachment: col-cal.patch
Description: Text Data

Attachment: col-dia.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]