update
[poppyer.git] / init / 21-diary-init.el
blob0cb1dd65d40e37fbcaa0f1e41c0509310b9a4b54
1 (setq org-agenda-include-diary t)
4 (defun find-today()
5 (interactive)
6 (search-backward (format-time-string date-format-string) nil t)
7 (search-forward (format-time-string date-format-string) nil t)
10 (add-hook 'diary-mode-hook (lambda()
11 (define-key diary-mode-map "\M-." 'find-today)
15 (setq view-diary-entries-initially t
16 mark-diary-entries-in-calendar t
17 number-of-diary-entries 7)
18 (add-hook 'diary-display-hook 'fancy-diary-display)
20 ;;Here is some code to get rid of the ugly equal signs under the date:
22 (add-hook 'fancy-diary-display-mode-hook
23 '(lambda ()
24 (alt-clean-equal-signs)))
25 (defun alt-clean-equal-signs ()
26 "This function makes lines of = signs invisible."
27 (goto-char (point-min))
28 (let ((state buffer-read-only))
29 (when state (setq buffer-read-only nil))
30 (while (not (eobp))
31 (search-forward-regexp "^=+$" nil 'move)
32 (add-text-properties (match-beginning 0)
33 (match-end 0)
34 '(invisible t)))
35 (when state (setq buffer-read-only t))))
38 (set 'today-visible-calendar-hook 'calendar-star-date)
39 ;;(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
41 (custom-set-faces
42 '(diary ((((class color) (background dark)) (:background "cyan"))))
43 ;; '(calendar-today ((((class color) (background dark)) (:background "green"))))
48 (setq appt-display-duration 360000)
49 (appt-activate t)