unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Shutko <ats@acm.org>
Cc: emacs-devel@gnu.org
Subject: Re: specific coloring of diary calendar entries
Date: Wed, 11 Dec 2002 20:02:13 -0500	[thread overview]
Message-ID: <873cp4vylm.fsf@wesley.springies.com> (raw)
In-Reply-To: m3adjc85w2.fsf@fischman.org

Ami Fischman <usenet@fischman.org> 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
next.

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 <ats@acm.org> - In a variety of flavors!
My opinions may have changed, but not the fact that I am right.

  reply	other threads:[~2002-12-12  1:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-11 23:58 specific coloring of diary calendar entries Ami Fischman
2002-12-12  1:02 ` Alan Shutko [this message]
2002-12-12 18:24   ` Ami Fischman
2002-12-12 18:56     ` Ami Fischman
2002-12-12 19:31     ` Alan Shutko
2002-12-13 10:14       ` Kai Großjohann
2002-12-14  1:05     ` Alan Shutko
2002-12-14  1:42       ` Miles Bader
2002-12-13 22:22 ` Richard Stallman
2002-12-13 23:37   ` Ami Fischman
2002-12-14  0:07     ` Alan Shutko
2002-12-15 23:39     ` Richard Stallman
2002-12-16  0:31       ` Alex Schroeder
2002-12-17 18:44         ` Richard Stallman
2002-12-17  6:18       ` Ami Fischman
2002-12-17  9:42         ` Alex Schroeder
2002-12-17 16:03           ` Alan Shutko
2002-12-17 11:05         ` Kai Großjohann
2002-12-17 16:02           ` Alan Shutko
2002-12-17 11:07         ` Kai Großjohann
2002-12-18  2:01         ` Richard Stallman
2002-12-18 22:27           ` Ami Fischman
2002-12-19  6:02             ` Ami Fischman
2002-12-19 18:03               ` Ami Fischman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873cp4vylm.fsf@wesley.springies.com \
    --to=ats@acm.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).