2019-07-21 00:37:46 +02:00
|
|
|
;;; org.el --- Module file for org-mode configuration.
|
2018-02-04 17:13:57 +00:00
|
|
|
;;
|
2019-07-21 00:37:46 +02:00
|
|
|
;; Copyright (C) 2017-2019 Wojciech Kozlowski
|
2018-02-04 17:13:57 +00:00
|
|
|
;;
|
2018-02-04 17:18:18 +00:00
|
|
|
;; Author: Wojciech Kozlowski <wk@wojciechkozlowski.eu>
|
2019-07-21 00:37:46 +02:00
|
|
|
;; Created: 2018-02-04
|
2018-02-04 17:13:57 +00:00
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; Commentary:
|
|
|
|
;;
|
|
|
|
;; This module sets up org-mode.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
|
|
|
;;; Required packages:
|
|
|
|
|
2018-07-07 21:34:00 +01:00
|
|
|
;;; Code:
|
2018-02-04 17:13:57 +00:00
|
|
|
|
|
|
|
|
2019-07-21 00:37:46 +02:00
|
|
|
(defvar emodule/org-packages
|
2018-07-07 21:34:00 +01:00
|
|
|
|
2019-02-10 10:56:01 +01:00
|
|
|
'(org-bullets
|
|
|
|
org-noter)
|
2018-07-07 21:34:00 +01:00
|
|
|
|
|
|
|
)
|
2018-02-04 17:13:57 +00:00
|
|
|
|
|
|
|
;; Configuration:
|
|
|
|
|
2019-07-21 00:37:46 +02:00
|
|
|
(defun emodule/org-init ()
|
|
|
|
"Initialise the `org' module."
|
2018-02-04 17:13:57 +00:00
|
|
|
|
2018-04-17 21:03:53 +01:00
|
|
|
(use-package org
|
2019-07-24 10:12:00 +02:00
|
|
|
:hook
|
|
|
|
(org-mode . auto-fill-mode)
|
2019-02-10 11:35:48 +01:00
|
|
|
:bind
|
|
|
|
(("C-c a" . org-agenda)
|
2019-05-07 19:14:57 +02:00
|
|
|
("C-c b" . org-switchb)
|
2019-02-10 11:35:48 +01:00
|
|
|
("C-c c" . org-capture)
|
|
|
|
("C-c l" . org-store-link))
|
2018-04-17 21:03:53 +01:00
|
|
|
:config
|
|
|
|
;; ------------------------------------------------------------------------
|
2019-02-10 11:35:48 +01:00
|
|
|
;; Set variables.
|
2018-04-17 21:03:53 +01:00
|
|
|
;; ------------------------------------------------------------------------
|
2018-02-04 17:13:57 +00:00
|
|
|
|
2019-02-10 11:35:48 +01:00
|
|
|
(setq
|
|
|
|
;; Hide special characters for italics/bold/underline.
|
|
|
|
org-hide-emphasis-markers t
|
2019-05-07 19:14:57 +02:00
|
|
|
;; Open org files unfolded
|
2019-07-24 15:54:13 +02:00
|
|
|
org-startup-folded nil
|
|
|
|
;; Catch edits in invisible areas (space after the ellipsis ...)
|
2019-07-24 23:28:24 +02:00
|
|
|
org-catch-invisible-edits 'error
|
|
|
|
;; Don't warn about deadlines - they're pretty visible as is
|
|
|
|
org-deadline-warning-days 0)
|
|
|
|
|
|
|
|
(setq org-agenda-prefix-format '((agenda . " %i %?-12t% s %b")
|
2019-07-26 15:49:37 +02:00
|
|
|
(todo . " %i %-48b")
|
2019-07-24 23:28:24 +02:00
|
|
|
(tags . " %i %b")
|
|
|
|
(search . " %i %b")))
|
2019-02-10 11:35:48 +01:00
|
|
|
|
|
|
|
;; ------------------------------------------------------------------------
|
|
|
|
;; Set workflow states.
|
|
|
|
;; ------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(setq org-todo-keywords
|
|
|
|
(quote ((sequence "TODO(t)"
|
|
|
|
"NEXT(n)"
|
|
|
|
"|"
|
|
|
|
"DONE(d)")
|
|
|
|
(sequence "WAIT(w@/!)"
|
|
|
|
"HOLD(h@/!)"
|
|
|
|
"|"
|
|
|
|
"UNPLANNED(c@/!)"))))
|
|
|
|
|
|
|
|
(setq org-todo-keyword-faces
|
2019-07-24 23:52:38 +02:00
|
|
|
(quote (("NEXT" :foreground "#96DEFA" :weight bold)
|
|
|
|
("WAIT" :foreground "#798A9B" :weight bold)
|
|
|
|
("HOLD" :foreground "#798A9B" :weight bold))))
|
2018-02-04 17:13:57 +00:00
|
|
|
|
2018-04-17 21:03:53 +01:00
|
|
|
;; ------------------------------------------------------------------------
|
|
|
|
;; Better bullet points.
|
|
|
|
;; ------------------------------------------------------------------------
|
2018-02-04 17:13:57 +00:00
|
|
|
|
2018-04-17 21:03:53 +01:00
|
|
|
(font-lock-add-keywords 'org-mode
|
|
|
|
'(("^ +\\(*\\) "
|
|
|
|
(0 (prog1 ()
|
|
|
|
(compose-region (match-beginning 1)
|
|
|
|
(match-end 1)
|
|
|
|
"•"))))))
|
2018-02-04 17:13:57 +00:00
|
|
|
|
2018-04-17 21:03:53 +01:00
|
|
|
;; ------------------------------------------------------------------------
|
|
|
|
;; LaTeX font size.
|
|
|
|
;; ------------------------------------------------------------------------
|
|
|
|
|
2019-02-10 11:35:48 +01:00
|
|
|
(plist-put org-format-latex-options :scale 2.0)
|
|
|
|
|
|
|
|
;; ------------------------------------------------------------------------
|
2019-07-26 15:49:37 +02:00
|
|
|
;; Setup agenda and capture files.
|
2019-02-10 11:35:48 +01:00
|
|
|
;; ------------------------------------------------------------------------
|
2019-07-26 15:49:37 +02:00
|
|
|
|
|
|
|
(setq
|
|
|
|
;; File for org-capture
|
|
|
|
org-default-notes-file "~/Workspace/notes.org"
|
|
|
|
;; Org-agenda files
|
|
|
|
org-agenda-files '("~/Workspace/agenda.org")))
|
2018-07-08 00:29:39 +01:00
|
|
|
|
|
|
|
;; ------------------------------------------------------------------------
|
|
|
|
;; Better header bullets
|
|
|
|
;; ------------------------------------------------------------------------
|
2018-04-17 21:03:53 +01:00
|
|
|
|
2018-07-08 00:29:39 +01:00
|
|
|
(use-package org-bullets
|
2019-02-10 11:35:48 +01:00
|
|
|
:hook (org-mode . org-bullets-mode))
|
2018-02-04 17:13:57 +00:00
|
|
|
|
2019-02-10 10:56:01 +01:00
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
;; Org-noter.
|
|
|
|
;; --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(use-package org-noter
|
|
|
|
:defer t)
|
|
|
|
|
2018-02-04 17:13:57 +00:00
|
|
|
)
|
2018-07-07 21:34:00 +01:00
|
|
|
|
2019-07-21 00:37:46 +02:00
|
|
|
(provide 'emodule/org)
|
|
|
|
;;; org.el ends here
|