;; 12-cal-sy.el --- Calendar Settings -*- Emacs-Lisp -*-
-;; Copyright (C) 2007 - 2012 Steve Youngs
+;; Copyright (C) 2007 - 2013 Steve Youngs
;; Author: Steve Youngs <steve@sxemacs.org>
;; Maintainer: Steve Youngs <steve@sxemacs.org>
;; Created: <2007-12-02>
-;; Time-stamp: <Friday Jun 29, 2012 16:25:18 steve>
+;; Time-stamp: <Friday Aug 16, 2013 09:27:03 steve>
;; Download: <http://bastard.steveyoungs.com/~steve/SXEmacs/inits/>
;; HTMLised: <http://bastard.steveyoungs.com/~steve/SXEmacs/htmlinits/12-cal-sy.html>
;; Git Repo: git clone http://git.sxemacs.org/syinit
calendar-time-zone 600
calendar-standard-time-zone-name "EST"
cal-tex-diary t
-; calendar-date-display-form
+; calendar-date-display-form ; see: "Howm Integration" below
; '((if dayname (concat dayname ", ")) day " " monthname " " year)
calendar-time-display-form
'(24-hours ":" minutes
(defvar fancy-diary-font-lock-keywords (fancy-diary-font-lock-keywords))
-(defun sy-update-diary-font-lock-keywords ()
- (sit-for 1.1)
- (setq fancy-diary-font-lock-keywords (fancy-diary-font-lock-keywords))
- ;(with-current-buffer (get-buffer-create fancy-diary-buffer)
- ; (font-lock-fontify-buffer))
- )
-
-(run-at-time "23:59:59" 86400 'sy-update-diary-font-lock-keywords)
-
;:*=======================
;:* Display ISO week numbers
;;
(include-other-diary-files)))
(add-hook 'mark-diary-entries-hook #'mark-included-diary-files)
(add-hook 'today-visible-calendar-hook #'calendar-mark-today)
+(add-hook 'calendar-move-hook #'(lambda () (diary-view-entries 1)))
+(add-hook 'calendar-mode-hook
+ #'(lambda ()
+ (setq fancy-diary-font-lock-keywords
+ (fancy-diary-font-lock-keywords))))
;:*=======================
;:* Appointments
display-time-mail-balloon-max-displayed 20
display-time-mail-balloon-gnus-split-width 19
display-time-mail-balloon-enhance-gnus-group
- '("\\(private.*\\|xemacs\\.private\\)")
+ '("private.*")
display-time-mail-balloon-suppress-gnus-group
'("\\(SPAM.*\\|returned\\.mail\\)"))
(display-time)
other-holidays nil)
;; Set up standard Aussie holidays
-(setq
- calendar-holidays '((holiday-fixed 1 1 "New Year's Day")
- ;; If New Year's day is on a weekend the public
- ;; holiday is the following Monday
- (if (or (eq 0 (calendar-day-of-week (list 1 1 displayed-year)))
- (eq 6 (calendar-day-of-week (list 1 1 displayed-year))))
- (holiday-float 1 1 1 "New Year's Day Public Holiday"))
- (holiday-fixed 1 26 "Australia Day")
- ;; If Australia Day falls on a weekend, the
- ;; holiday is the following Monday
- (if (eq 0 (calendar-day-of-week (list 1 26 displayed-year)))
- (holiday-fixed 1 27 "Australia Day Public Holiday"))
- (if (eq 6 (calendar-day-of-week (list 1 26 displayed-year)))
- (holiday-fixed 1 28 "Australia Day Public Holiday"))
- (holiday-fixed 2 14 "Valentine's Day")
- (holiday-fixed 3 17 "St. Patrick's Day")
- (holiday-fixed 4 1 "April Fools' Day")
- (holiday-fixed 4 25 "Anzac Day")
- ;; If Anzac Day falls on a weekend, the holiday
- ;; is the following Monday
- (if (eq 0 (calendar-day-of-week (list 4 25 displayed-year)))
- (holiday-fixed 4 26 "Anzac Day Public Holiday"))
- (if (eq 6 (calendar-day-of-week (list 4 25 displayed-year)))
- (holiday-fixed 4 27 "Anzac Day Public Holiday"))
- (holiday-float 5 1 1 "Labour Day")
- (holiday-float 5 0 2 "Mother's Day")
- (holiday-float 6 1 2 "Queen's Birthday")
- ;; Brisbane Ekka holiday is on the 2nd Wednesday
- ;; in August, unless there are 5 Wednesdays in
- ;; August, then it is the 3rd Wednesday.
- (if (eq 8 (car (calendar-nth-named-day 5 3 8 displayed-year 0)))
- (holiday-float 8 3 3 "Brisbane Show Day")
- (holiday-float 8 3 2 "Brisbane Show Day"))
- (holiday-float 8 3 3 "Brisbane Show Day") ; This might be wrong?
- (holiday-float 9 0 1 "Father's Day")
- (holiday-fixed 12 25 "Christmas Day")
- (holiday-fixed 12 26 "Boxing Day")
- ;; If Xmas falls on weekend, the public holiday
- ;; is the following Mon/Tue
- (if (or (eq 0 (calendar-day-of-week (list 12 25 displayed-year)))
- (eq 6 (calendar-day-of-week (list 12 25 displayed-year))))
- (holiday-fixed 12 27 "Xmas Day Public Holiday"))
- (if (or (eq 0 (calendar-day-of-week (list 12 26 displayed-year)))
- (eq 6 (calendar-day-of-week (list 12 26 displayed-year))))
- (holiday-fixed 12 28 "Boxing Day Public Holiday"))
- (solar-equinoxes-solstices)
- (sy-easter-holidays)))
+(setq calendar-holidays
+ '((holiday-fixed 1 1 "New Year's Day")
+ ;; If New Year's day is on a weekend the public
+ ;; holiday is the following Monday
+ (if (or (eq 0 (calendar-day-of-week (list 1 1 displayed-year)))
+ (eq 6 (calendar-day-of-week (list 1 1 displayed-year))))
+ (holiday-float 1 1 1 "New Year's Day Public Holiday"))
+ (holiday-fixed 1 26 "Australia Day")
+ ;; If Australia Day falls on a weekend, the
+ ;; holiday is the following Monday
+ (if (eq 0 (calendar-day-of-week (list 1 26 displayed-year)))
+ (holiday-fixed 1 27 "Australia Day Public Holiday"))
+ (if (eq 6 (calendar-day-of-week (list 1 26 displayed-year)))
+ (holiday-fixed 1 28 "Australia Day Public Holiday"))
+ (holiday-fixed 2 14 "Valentine's Day")
+ (holiday-fixed 3 17 "St. Patrick's Day")
+ (holiday-fixed 4 1 "April Fools' Day")
+ (holiday-fixed 4 25 "Anzac Day")
+ ;; If Anzac Day falls on a weekend, the holiday
+ ;; is the following Monday
+ (if (eq 0 (calendar-day-of-week (list 4 25 displayed-year)))
+ (holiday-fixed 4 26 "Anzac Day Public Holiday"))
+ (if (eq 6 (calendar-day-of-week (list 4 25 displayed-year)))
+ (holiday-fixed 4 27 "Anzac Day Public Holiday"))
+ (holiday-float 5 1 1 "Labour Day")
+ (holiday-float 5 0 2 "Mother's Day")
+ (holiday-float 6 1 2 "Queen's Birthday")
+ ;; Brisbane Ekka holiday is on the 2nd Wednesday
+ ;; in August, unless there are 5 Wednesdays in
+ ;; August, then it is the 3rd Wednesday.
+ (if (eq 8 (car (calendar-nth-named-day 5 3 8 displayed-year)))
+ (holiday-float 8 3 3 "Brisbane Show Day")
+ (holiday-float 8 3 2 "Brisbane Show Day"))
+ (holiday-float 9 0 1 "Father's Day")
+ (holiday-fixed 12 25 "Christmas Day")
+ (holiday-fixed 12 26 "Boxing Day")
+ ;; If Xmas falls on weekend, the public holiday
+ ;; is the following Mon/Tue
+ (if (or (eq 0 (calendar-day-of-week (list 12 25 displayed-year)))
+ (eq 6 (calendar-day-of-week (list 12 25 displayed-year))))
+ (holiday-fixed 12 27 "Xmas Day Public Holiday"))
+ (if (or (eq 0 (calendar-day-of-week (list 12 26 displayed-year)))
+ (eq 6 (calendar-day-of-week (list 12 26 displayed-year))))
+ (holiday-fixed 12 28 "Boxing Day Public Holiday"))
+ (solar-equinoxes-solstices)
+ (sy-easter-holidays)))
(setq mark-holidays-in-calendar t)
;:*=======================