Skip to content

Commit

Permalink
disable org-mac-iCal
Browse files Browse the repository at this point in the history
  • Loading branch information
chen bin committed May 5, 2012
1 parent f75a731 commit 7b5dc6b
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions init-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,31 @@
;; Removes clocked tasks with 0:00 duration
(setq org-clock-out-remove-zero-time-clocks t)

;; Show iCal calendars in the org agenda
(when *is-a-mac*
(eval-after-load "org"
'(if *is-a-mac* (require 'org-mac-iCal)))
(setq org-agenda-include-diary t)

(setq org-agenda-custom-commands
'(("I" "Import diary from iCal" agenda ""
((org-agenda-mode-hook
(lambda ()
(org-mac-iCal)))))))

(add-hook 'org-agenda-cleanup-fancy-diary-hook
(lambda ()
(goto-char (point-min))
(save-excursion
(while (re-search-forward "^[a-z]" nil t)
(goto-char (match-beginning 0))
(insert "0:00-24:00 ")))
(while (re-search-forward "^ [a-z]" nil t)
(goto-char (match-beginning 0))
(save-excursion
(re-search-backward "^[0-9]+:[0-9]+-[0-9]+:[0-9]+ " nil t))
(insert (match-string 0)))))
)
;; ;; Show iCal calendars in the org agenda
;; (when *is-a-mac*
;; (eval-after-load "org"
;; '(if *is-a-mac* (require 'org-mac-iCal)))
;; (setq org-agenda-include-diary t)
;;
;; (setq org-agenda-custom-commands
;; '(("I" "Import diary from iCal" agenda ""
;; ((org-agenda-mode-hook
;; (lambda ()
;; (org-mac-iCal)))))))
;;
;; (add-hook 'org-agenda-cleanup-fancy-diary-hook
;; (lambda ()
;; (goto-char (point-min))
;; (save-excursion
;; (while (re-search-forward "^[a-z]" nil t)
;; (goto-char (match-beginning 0))
;; (insert "0:00-24:00 ")))
;; (while (re-search-forward "^ [a-z]" nil t)
;; (goto-char (match-beginning 0))
;; (save-excursion
;; (re-search-backward "^[0-9]+:[0-9]+-[0-9]+:[0-9]+ " nil t))
;; (insert (match-string 0)))))
;; )


(eval-after-load 'org
Expand Down

0 comments on commit 7b5dc6b

Please sign in to comment.