Tuesday, July 15, 2008

jerry-org.el

;;; jerry-org.el --- org模式的配置
;;; Code:
(add-to-list 'load-path "~/lib/emacs-lisp/org-6.01d/lisp")
(add-to-list 'load-path "~/lib/emacs-lisp/org-6.01d/contrib/lisp")

(require 'org-install)

(setq org-agenda-files
  (list "~/.emacs.d/org/work.org"
  ; "~/org/sparetime.org"
  "~/.emacs.d/org/home.org"
  ; "~/org/fortune.org"
  ))

(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))

;; ;(define-key global-map "\C-cl" 'org-store-link)
;; ;(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done 'time)

;; Face for TODO keywords
(setq org-todo-keyword-faces
  '(
 ("TODO" . (:foreground "red" :weight bold))
 ;("TODO" . org-warning)
 ("DEFERRED" . shadow) ;; 延缓执行
 ("CANCELED" . (:foreground "blue" :weight bold));;取消
 ))
(setq org-todo-keywords '("TODO" "FEEDBACK" "VERIFY"
  "DEFERRED" "CANCELED" "DONE")
  org-todo-interpretation 'sequence)

;; OrgMode & Remember
(org-remember-insinuate)
(setq org-directory "~/org")
(setq org-default-notes-file "~/org/notes.org")
(setq remember-annotation-functions '(org-remember-annotation))
(setq remember-handler-functions '(org-remember-handler))
(add-hook 'remember-mode-hook 'org-remember-apply-template)


;; 关联上Emacs的diary
;; (setq org-agenda-include-diary t)
;; open appt message function
(add-hook 'diary-hook 'appt-make-list)
(setq appt-display-diary nil)

;; org to appt
(setq appt-display-format 'window)
(setq appt-display-duration 60)
(setq appt-audible t)
(setq appt-display-mode-line t)
(appt-activate 1)
;(setq appt-msg-countdown-list '(10 0))
  ;(org-agenda)
(org-agenda-to-appt )
;; 只要你在任务中,C-c C-s后,把Schedule的单词删除,那么就是
;; 一个时间戳的概念,那么OrgMode就知道你是要让这个任务中特定的
;; 时间跳出来,提醒你。这时,需要你使用我之前注释掉的代码:

;; 来让OrgMode将这个任务条转换为appt。


(provide 'jerry-org)

;;; jerry-org.el ends here

No comments: