From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Shutko Newsgroups: gmane.emacs.devel Subject: Re: specific coloring of diary calendar entries Date: Wed, 11 Dec 2002 20:02:13 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <873cp4vylm.fsf@wesley.springies.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1039655105 1088 80.91.224.249 (12 Dec 2002 01:05:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 12 Dec 2002 01:05:05 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18MHmf-0000HN-00 for ; Thu, 12 Dec 2002 02:05:01 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18MHxy-0002fC-00 for ; Thu, 12 Dec 2002 02:16:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18MHmA-00082F-00 for emacs-devel@quimby.gnus.org; Wed, 11 Dec 2002 20:04:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18MHlj-0007zW-00 for emacs-devel@gnu.org; Wed, 11 Dec 2002 20:04:03 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18MHlh-0007xu-00 for emacs-devel@gnu.org; Wed, 11 Dec 2002 20:04:02 -0500 Original-Received: from ool-182f7213.dyn.optonline.net ([24.47.114.19] helo=simon.springies.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18MHlH-0007Xt-00 for emacs-devel@gnu.org; Wed, 11 Dec 2002 20:03:35 -0500 Original-Received: from wesley.springies.com ([192.168.1.2] ident=mail) by simon.springies.com with esmtp (Exim 3.35 #1 (Debian)) id 18MHlF-0006Vk-00; Wed, 11 Dec 2002 20:03:33 -0500 Original-Received: from ats by wesley.springies.com with local (Exim 3.36 #1 (Debian)) id 18MHlF-0002fW-00; Wed, 11 Dec 2002 20:03:33 -0500 Original-To: Ami Fischman User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Original-cc: Ed Reingold X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10077 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10077 Ami Fischman 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 - In a variety of flavors! My opinions may have changed, but not the fact that I am right.