emacs , org-mode change
authorPeng Li <seudut@gmail.com>
Sat, 12 Sep 2015 02:41:32 +0000 (10:41 +0800)
committerPeng Li <seudut@gmail.com>
Sat, 12 Sep 2015 02:41:32 +0000 (10:41 +0800)
emacs.d/config/init-org.el

index 10d171a..9f14e0f 100644 (file)
 ;;                      (define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand)))
 
 
 ;;                      (define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand)))
 
 
+;(org-indent-mode 1)
+
 
 ;; org-todo
 
 ;; org-todo
+;; define more state of todo
 (setq org-todo-keywords
       (quote ((sequence "TODO(t)" "STARTED(s)" "|" "DONE(d)")
               (sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" "CANCELLED(c@/!)" ))))
 (setq org-todo-keywords
       (quote ((sequence "TODO(t)" "STARTED(s)" "|" "DONE(d)")
               (sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" "CANCELLED(c@/!)" ))))
               ("PHONE" :foreground "forest green" :weight bold))))
 
 (setq org-use-fast-todo-selection t)
               ("PHONE" :foreground "forest green" :weight bold))))
 
 (setq org-use-fast-todo-selection t)
+
+;; allow S-left/right to rotate state not set timestamp and add note
 (setq org-treat-S-cursor-todo-selection-as-state-change nil)
 
 (setq org-treat-S-cursor-todo-selection-as-state-change nil)
 
+;; trigger a tags for the task when changing state
 (setq org-todo-state-tags-triggers
       (quote (("CANCELLED" ("CANCELLED" . t))
               ("WAITING" ("WAITING" . t))
 (setq org-todo-state-tags-triggers
       (quote (("CANCELLED" ("CANCELLED" . t))
               ("WAITING" ("WAITING" . t))
 (define-key global-map "\C-cc" 'org-capture)
 
 
 (define-key global-map "\C-cc" 'org-capture)
 
 
+(setq org-refile-targets (quote ((nil :maxlevel . 9)
+                                 (org-agenda-files :maxlevel . 9))))
+
+
+
+
+;; Capture templates for: TODO tasks, Notes, appointments, phone calls, meetings, and org-protocol
+;(setq org-capture-templates
+;      (quote (("t" "todo" entry (file "~/git/org/refile.org")
+;               "* TODO %?\n%U\n%a\n" :clock-in t :clock-resume t)
+;              ("r" "respond" entry (file "~/git/org/refile.org")
+;               "* NEXT Respond to %:from on %:subject\nSCHEDULED: %t\n%U\n%a\n" :clock-in t :clock-resume t :immediate-finish t)
+;              ("n" "note" entry (file "~/git/org/refile.org")
+;               "* %? :NOTE:\n%U\n%a\n" :clock-in t :clock-resume t)
+;              ("j" "Journal" entry (file+datetree "~/git/org/diary.org")
+;               "* %?\n%U\n" :clock-in t :clock-resume t)
+;              ("w" "org-protocol" entry (file "~/git/org/refile.org")
+;               "* TODO Review %c\n%U\n" :immediate-finish t)
+;              ("m" "Meeting" entry (file "~/git/org/refile.org")
+;               "* MEETING with %? :MEETING:\n%U" :clock-in t :clock-resume t)
+;              ("p" "Phone call" entry (file "~/git/org/refile.org")
+;               "* PHONE %? :PHONE:\n%U" :clock-in t :clock-resume t)
+;              ("h" "Habit" entry (file "~/git/org/refile.org")
+;               "* NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \"%<<%Y-%m-%d %a .+1d/3d>>\")\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n"))))
+
+
+;;; org-tag
+; Tags with fast selection keys
+(setq org-tag-alist (quote ((:startgroup)
+                            ("@errand" . ?e)
+                            ("@office" . ?o)
+                            ("@home" . ?H)
+                            ("@farm" . ?f)
+                            (:endgroup)
+                            ("WAITING" . ?w)
+                            ("HOLD" . ?h)
+                            ("PERSONAL" . ?P)
+                            ("WORK" . ?W)
+                            ("FARM" . ?F)
+                            ("ORG" . ?O)
+                            ("NORANG" . ?N)
+                            ("crypt" . ?E)
+                            ("NOTE" . ?n)
+                            ("CANCELLED" . ?c)
+                            ("FLAGGED" . ??))))
+
+; Allow setting single tags without the menu
+(setq org-fast-tag-selection-single-key (quote expert))
+
+; For tag searches ignore tasks with scheduled and deadline dates
+(setq org-agenda-tags-todo-honor-ignore-options t)
+
+
+;; Always hilight the current agenda line
+(add-hook 'org-agenda-mode-hook
+          '(lambda () (hl-line-mode 1))
+          'append)
+
+
+
+;; The following custom-set-faces create the highlights
+(custom-set-faces
+  ;; custom-set-faces was added by Custom.
+  ;; If you edit it by hand, you could mess it up, so be careful.
+  ;; Your init file should contain only one such instance.
+  ;; If there is more than one, they won't work right.
+ '(org-mode-line-clock ((t (:background "grey75" :foreground "red" :box (:line-width -1 :style released-button)))) t))
+
+
+
 
 (provide 'init-org)
 
 (provide 'init-org)