[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Calendar hack: Displaying ISO weeks, update for emacs 22
From: |
Alf-Ivar Holm |
Subject: |
Calendar hack: Displaying ISO weeks, update for emacs 22 |
Date: |
Fri, 01 Dec 2006 14:53:44 +0100 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) |
Just tried 22.0.91 and noticed that `facemenu-unlisted-faces' has been
removed, a variable I have used in a hack I have been using for 10
years for marking the ISO week in the calendar. This is what the it
looks like, without the colours, and with `calendar-week-start-day'
set to 1:
November 2006 December 2006 January 2007
Mo Tu We Th Fr Sa Su WK Mo Tu We Th Fr Sa Su WK Mo Tu We Th Fr Sa Su WK
1 2 3 4 5 44 1 2 3 48 1 2 3 4 5 6 7 1
6 7 8 9 10 11 12 45 4 5 6 7 8 9 10 49 8 9 10 11 12 13 14 2
13 14 15 16 17 18 19 46 11 12 13 14 15 16 17 50 15 16 17 18 19 20 21 3
20 21 22 23 24 25 26 47 18 19 20 21 22 23 24 51 22 23 24 25 26 27 28 4
27 28 29 30 25 26 27 28 29 30 31 52 29 30 31
I've posted it here before, but included is the update that works for
the upcomming emacs as well. I've tried the updated hack in emacs
version 21.4 and 22.0.91.
Howto: Add the file to your load path, and put:
(require 'calendar-hack)
in your .emacs.
Note: the hack is a rewrite of `generate-calendar-month' from the
calender.el package, as I were not able to defadvice it with the
needed functionality. I see that the new version of calendar.el has
removed the following block from the function:
(if enable-multibyte-characters
(truncate-string-to-width string 2)
(substring string 0 2)))
and I should probably do the same, but I guess that would remove
support for older emacs versions, and not everybody here have upgraded
yet, I guess.
Affi
calendar-hack.el
Description: Displaying ISO week in calendar
- Calendar hack: Displaying ISO weeks, update for emacs 22,
Alf-Ivar Holm <=
- Re: Calendar hack: Displaying ISO weeks, update for emacs 22, Glenn Morris, 2006/12/01
- Re: Calendar hack: Displaying ISO weeks, update for emacs 22, Richard Stallman, 2006/12/02
- Calendar hack: Displaying ISO weeks, update for emacs 22, the real update, Alf-Ivar Holm, 2006/12/06