ambevar-dotfiles/.emacs.d/lisp/init-org.el

52 lines
1.7 KiB
EmacsLisp
Raw Normal View History

;;; Org mode
2014-09-22 17:03:29 +02:00
;;; TODO: org-import should be able to parse "|" in CSV files.
(define-key org-mode-map (kbd "C-c C-a") 'org-agenda)
(setq
;; Move annoying babel folder.
org-babel-temporary-directory (concat emacs-cache-folder "babel")
;; Disable line splitting on M-RET.
org-M-RET-may-split-line '((default))
org-insert-heading-respect-content t
org-enforce-todo-dependencies t
org-deadline-warning-days 7
org-agenda-default-appointment-duration 60
org-agenda-columns-add-appointments-to-effort-sum t
2017-07-28 18:20:14 +02:00
org-ellipsis " […]"
2017-10-08 20:21:11 +02:00
org-adapt-indentation nil
;; Org-mode aligns text.
2017-06-22 19:02:12 +02:00
indent-tabs-mode nil)
2014-09-22 17:03:29 +02:00
;;; Agendas.
(add-to-list 'org-agenda-files "~/personal/todo/todo.org")
(defun org-find-first-agenda ()
(interactive)
(find-file (car org-agenda-files)))
2017-07-02 20:07:19 +02:00
;;; Set PDF association in Org-mode (original is 'default).
(setcdr (assoc "\\.pdf\\'" org-file-apps) 'emacs)
;;; Hooks.
(dolist (fun '(turn-off-linum turn-off-indent-tabs turn-off-auto-fill))
(add-hook 'org-mode-hook fun))
2017-07-26 12:11:58 +02:00
(when (require 'org-contacts nil t)
(let ((contacts "~/personal/contacts/contacts.org"))
(when (file-exists-p contacts)
;; When used to auto-complete e-mail addresses, the file is automatically
;; loaded. The buffer usually need not be restored by a desktop session.
(setq desktop-files-not-to-save (concat (substring desktop-files-not-to-save 0 -2) "\\|" (regexp-quote (expand-file-name contacts)) "\\)"))
(setq org-contacts-files (list contacts)))))
2017-07-26 12:11:58 +02:00
2017-08-29 18:31:48 +02:00
;;; Add keywords.
(setq org-todo-keywords '((sequence "TODO" "REVIEW" "DONE")))
2017-08-31 20:49:04 +02:00
(setq org-todo-keyword-faces '(("REVIEW" :inherit org-done)))
2017-08-29 18:31:48 +02:00
2017-10-14 23:18:04 +02:00
;;; Priorities.
(setq org-priority-start-cycle-with-default nil
org-default-priority 66)
(provide 'init-org)