dot/emacs: Pick the right master diary file.
[profile] / dot / emacs
index 37e742d..6dbbbed 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
 ;;;--------------------------------------------------------------------------
 ;;; Calendar configuration.
 
-(setq diary-file "~/etc/state/diary")
+(setq diary-file
+      (let ((main-diary "~/etc/state/diary")
+           (private-diary "~/etc/state.private/diary.private"))
+       (if (file-exists-p private-diary)
+           private-diary
+         main-diary)))
 
 ;; Trivial stuff for the sunrise/sunset calculations.
 
 ;; Date format fiddling.
 
 (setq european-calendar-style t
-      calendar-date-style 'european)
-
-(setq diary-date-forms '((day "[-/]" month "[^-/0-9]")
-                        (day " *" monthname "[ \t]*\\(\^M\\|\n\\)")
-                        (backup day " *" monthname "\\W+\\<[^*0-9]")
-                        (day "[-/]" month "[-/]" year "[^0-9]")
-                        (day " *" monthname " *" year "[^0-9]")
-                        (year "[-/]" month "[-/]" day "[^0-9]")
-                        (dayname "\\W")))
+      calendar-date-style 'european
+      calendar-time-display-form
+      '(24-hours ":" minutes
+       (if time-zone " (") time-zone (if time-zone ")")))
+
+(setq diary-date-forms
+      '((day "[-/]" month "[^-/0-9]")
+       (day " *" monthname "[ \t]*\\(\^M\\|\n\\)")
+       (backup day " *" monthname "\\W+\\<\\([^*0-9]\\|[0-9]+[:aApP]\\)")
+       (day "[-/]" month "[-/]" year "[^0-9]")
+       (day " *" monthname " *" year "[^0-9]")
+       (year "[-/]" month "[-/]" day "[^0-9]")
+       (dayname "\\W")))
 
 ;; Fancy diary handling.