[Top][All Lists]

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

Re: specific coloring of diary calendar entries

From: Alan Shutko
Subject: Re: specific coloring of diary calendar entries
Date: Wed, 11 Dec 2002 20:02:13 -0500
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

Ami Fischman <address@hidden> writes:

> Attached are two patches that make it possible to specify a color for a
> diary entry in the entry itself.

First, some general comments.  Your diff is reversed.  Next time,
specify the files in the opposite order: old file first, new file

Second, those files have changes a bit since the version you're
looking at.  You should update to the latest CVS and redo your changes
against it.  In particular, things have been changed to allow
specification of colors for sexp diary entries (currently, only in the
calendar display), and font-lock has been enabled.

The way the sexp entry coloration works is that you specify a face in
the sexp.  This lets you specify not only foreground color, but also
slants, under or overline, inverse video, background, etc.
Personally, I think it would be better if your feature did things the
same way.  That way, you could apply all the faces you find for a
day, not just the first.  If the different faces don't specify the
same attributes, the overlays will automatically combine them.

You added arguments to a number of functions, but you didn't change
other files that use them.  (For example, both
mark-calendar-days-named and add-to-diary-list are used in cal-hebrew
and cal-islam.)  Unless you absolutely have to, could you avoid making
incompatible changes to the interface?  Calendar has been around for
quite a while, and it's quite possible someone else is depending on
the behavior of the old functions.  If you need to add a parameter,
make it optional, and make sure the function works correctly if it's
not passed.

I don't think it's very helpful to have the file glob color in the
diary-entries-list.  Instead, I'd recommend putting the face that
should be used for that entry.  That way, appt.el won't have to
reparse things to display the right color/face in its popups.  So,
that means I suggest you parse out the entry color when reading the
entry, and remove that text before putting it into diary-entries-list.
That way, without changes appt.el will work, and it can eventually be
extended to use the colors.  Also, the sexp entries can place _their_
face into the same place and get the same display.

I'd disagree that sexps are necessarily less important than regular
entries, btw.  If you don't see your anniversary on the calendar because
the color to pick your kid up after school overrode it, you're in for
a heap of trouble....

I'm also not sure about the specific syntax in the diary file, but
I'd leave that decision to Ed Reingold.  (He's the maintainer of the
Calendar, and since I'm not sure he reads emacs-devel, I'm going to
forward your message to him after I send this one.)

Thanks for your work.  Coloring things in the fancy-diary-display was
on my todo list, and I do see a need to color regular entries.

Alan Shutko <address@hidden> - In a variety of flavors!
My opinions may have changed, but not the fact that I am right.

reply via email to

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