[Top][All Lists]

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

Fontification problem with fancy diary display

From: Stephen Berman
Subject: Fontification problem with fancy diary display
Date: Thu, 04 May 2006 18:12:08 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

1. emacs -Q 2. Save the follow lines as ~/diary: Monday 8.00 Xxxxxxxx xx Xxxxxxxx Xxxxxxxxxx xxx Xxxxxxxxxxxxx
Monday 14.30 Xxxxxx XxxxxXXxXxxxxx xxx Xxxx
Monday 15.30-17.00 Xxxx XxxxxXX
Monday 16.45 Xxxx xxx XxxxxXX xxxxxxx
Monday 17.15-18.15 Xxxx XxxxxXx
Tuesday 14.50 Xxxx xxx Xxxxxxxxxxxxxxxxxxxxx xxxxxxx
Tuesday 15.30-16.00 Xxxx Xxxxxxxxxxxxxxxxx
Wednesday 20.00-21.15 Xxxxxx Xxxxxx
Friday 9.00 Xxxx Xxxxxx Xxxxx xXxxxxxxxxxxxx
Friday 15.20-15.50 Xxxx Xxxxxxxxxxxxxxxxx
Friday 17.30-19.00 Xxxx Xxxxxxxxxx
Friday 18.00-19.30 Xxxx XXX

3. Eval the following sexps:

(setq view-diary-entries-initially t
     number-of-diary-entries 7)
(add-hook 'diary-display-hook 'fancy-diary-display)

4. M-x calendar

When I do steps 1-4 on Thursday or Friday, I get a fancy diary display
in which the date strings for Friday, Monday, and Tuesday, and their
accompanying separators (strings of "=" underlining the date) are
fontified with the diary face (red by default); but the date string
for Wednesday and its separator are fontified with the default face

I haven't been able to figure out precisely under what conditions this
problem arises, but at least the following obtain collectively:
- Neither Saturday or Sunday may have an entry.
- Wednesday must have at least one entry.
- Tuesday must have at least two entries.
- Friday and Monday together must have at least nine entries, but as
long as each day has at least one entry, it doesn't matter how the
remaining seven entries are distributed between the two days.
- The length of the entries appears to be significant: I tested the
same distribution of entries, in which each entry consisted only of
the word `test' (plus a time), and didn't get the problem (the above
entries are length-preserving anonymizations of the actual entries
from my diary that show the problem).

I've observed this problem for a long time (at least many months), but
haven't taken a closer look at it till now.  I tried edebugging it and
found that the problem occurs when fancy-diary-display-mode is called
by fancy-diary-display, which initializes
fancy-diary-font-lock-keywords.  But I couldn't see anything wrong
there, so I don't know how to investigate further.

In GNU Emacs (i686-pc-linux-gnu, GTK+ Version 2.8.10)
of 2006-04-17 on escher
X server distributor `The X.Org Foundation', version 11.0.60802000
configured using `configure '--with-x-toolkit=gtk''

Important settings:
 value of $LC_ALL: nil
 value of $LC_COLLATE: nil
 value of $LC_CTYPE: nil
 value of $LC_MESSAGES: nil
 value of $LC_MONETARY: nil
 value of $LC_NUMERIC: nil
 value of $LC_TIME: nil
 value of $LANG: en_US.UTF-8
 locale-coding-system: utf-8
 default-enable-multibyte-characters: t

Major mode: Diary

Minor modes in effect:
 longlines-mode: t
 tabbar-mwheel-mode: t
 tabbar-mode: t
 recentf-mode: t
 show-paren-mode: t
 display-time-mode: t
 tooltip-mode: t
 auto-compression-mode: t
 tool-bar-mode: t
 mouse-wheel-mode: t
 use-hard-newlines: t
 menu-bar-mode: t
 file-name-shadow-mode: t
 global-font-lock-mode: t
 font-lock-mode: t
 unify-8859-on-encoding-mode: t
 utf-translate-cjk-mode: t
 column-number-mode: t
 line-number-mode: t

Recent input:
<return> ! C-x C-s <select-window> <down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1> <f12> C-_ <right> C-_ C-_ <help-echo> <down-mouse-1> <mouse-1> C-y M-y M-y M-y M-y M-d <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-2> <mouse-2> M-d <down-mouse-2> <mouse-2> M-y M-d <down-mouse-2> <mouse-2> M-y M-y M-d <down-mouse-1> <mouse-1> # C-x C-s <select-window> <down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1> <select-window> <help-echo> <help-echo> C-_ C-_ C-_ C-_ C-_ C-x C-s C-_ C-_ C-_ C-_ C-_ C-_ M-s M-d M o n d a y <down> C-a <down> # C-x C-s <select-window> <down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1> C-_ <f12> C-_ C-x C-s <f1> M-x e <backspace> r e p o r <tab> <return>

Recent messages:
Preparing diary...
Wrote /home/steve/diary
Marking diary entries...done
undo-more: No further undo information for region
Preparing diary...
Wrote /home/steve/diary
Marking diary entries...done
Loading emacsbug...done

reply via email to

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