This repository has been archived on 2022-12-11. You can view files and clone it, but cannot push or open issues or pull requests.
dot-files/.emacs.d/config/org-mode.el

55 lines
2.0 KiB
EmacsLisp

;; (C) Copyright Collin J. Doering 2014
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; File: org-mode.el
;; Author: Collin J. Doering <collin.doering@rekahsoft.ca>
;; Date: Oct 22, 2014
;; Setup emacs-org-mode
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when global-font-lock-mode is on
(setq org-return-follows-link t
org-log-done 'time
org-src-fontify-natively t
org-enforce-todo-dependencies t)
;; Enable org-mode capture
(setq org-default-notes-file "~/.org/notes.org") ;; (concat org-directory "/notes.org"))
(define-key global-map "\C-cc" 'org-capture)
(setq org-capture-templates
'(("t" "General Todo" entry
(file+olp "~/.org/notes.org" "Notes" "Tasks" "General")
"* TODO %?\n %i\n" :kill-buffer)
("f" "Todo in current file" entry
(file+olp "~/.org/notes.org" "Notes" "Tasks" "Per-File")
"* TODO %? %i\n See: %a")
("r" "Remember something" entry
(file+olp "~/.org/notes.org" "Notes" "Things to Remember")
"* %?" :kill-buffer)
("j" "Journal" entry
(file+datetree "~/.org/notes.org")
"* %?\nEntered on %U\n %i\n %a" :kill-buffer)))
;; Add additional languages for org-babel (now part of org-mode)
(org-babel-do-load-languages
'org-babel-load-languages
'((haskell . t)))
;; Set keybindings for org-mode
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)