2018-07-07 21:34:00 +01:00
|
|
|
;;; em-org.el --- Module file for org-mode configuration.
|
2018-02-04 17:13:57 +00:00
|
|
|
;;
|
|
|
|
;; Copyright (C) 2017 Wojciech Kozlowski
|
|
|
|
;;
|
2018-02-04 17:18:18 +00:00
|
|
|
;; Author: Wojciech Kozlowski <wk@wojciechkozlowski.eu>
|
2018-02-04 17:13:57 +00:00
|
|
|
;; Created: 4 Feb 2018
|
|
|
|
;;
|
|
|
|
;; 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
|
|
|
|
|
|
|
|
2018-07-07 21:34:00 +01:00
|
|
|
(defvar emodule/em-org-packages
|
|
|
|
|
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:
|
|
|
|
|
2018-07-07 21:34:00 +01:00
|
|
|
(defun emodule/em-org-init ()
|
|
|
|
"Initialise the `em-org' module."
|
2018-02-04 17:13:57 +00:00
|
|
|
|
2018-04-17 21:03:53 +01:00
|
|
|
(use-package org
|
2019-02-10 11:35:48 +01:00
|
|
|
:bind
|
|
|
|
(("C-c a" . org-agenda)
|
|
|
|
("C-c c" . org-capture)
|
|
|
|
("C-c i" . org-iswitchb)
|
|
|
|
("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
|
|
|
|
;; Add timestamp when tasks are marked as done.
|
|
|
|
org-log-done t)
|
|
|
|
|
|
|
|
;; ------------------------------------------------------------------------
|
|
|
|
;; 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
|
|
|
|
(quote (("NEXT" :foreground "#96DEFA" :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)
|
|
|
|
|
|
|
|
;; ------------------------------------------------------------------------
|
|
|
|
;; Load agenda-files.
|
|
|
|
;; ------------------------------------------------------------------------
|
2019-04-02 10:12:06 +02:00
|
|
|
(let* ((org-dir "~/Workspace/org/")
|
|
|
|
(file-list (concat org-dir "agenda-files.el")))
|
|
|
|
(when (file-exists-p file-list)
|
|
|
|
(load file-list))))
|
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
|
|
|
|
|
|
|
(provide 'em-org)
|
|
|
|
;;; em-org.el ends here
|