This repository has been archived on 2022-11-18. You can view files and clone it, but cannot push or open issues or pull requests.
emacs/modules/em-org.el

110 lines
3.2 KiB
EmacsLisp
Raw Normal View History

2018-07-07 22:34:00 +02:00
;;; em-org.el --- Module file for org-mode configuration.
2018-02-04 18:13:57 +01:00
;;
;; Copyright (C) 2017 Wojciech Kozlowski
;;
2018-02-04 18:18:18 +01:00
;; Author: Wojciech Kozlowski <wk@wojciechkozlowski.eu>
2018-02-04 18:13:57 +01: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 22:34:00 +02:00
;;; Code:
2018-02-04 18:13:57 +01:00
2018-07-07 22:34:00 +02:00
(defvar emodule/em-org-packages
2019-02-10 10:56:01 +01:00
'(org-bullets
org-noter)
2018-07-07 22:34:00 +02:00
)
2018-02-04 18:13:57 +01:00
;; Configuration:
2018-07-07 22:34:00 +02:00
(defun emodule/em-org-init ()
"Initialise the `em-org' module."
2018-02-04 18:13:57 +01:00
2018-04-17 22:03:53 +02: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 22:03:53 +02:00
:config
;; ------------------------------------------------------------------------
2019-02-10 11:35:48 +01:00
;; Set variables.
2018-04-17 22:03:53 +02:00
;; ------------------------------------------------------------------------
2018-02-04 18:13:57 +01: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 18:13:57 +01:00
2018-04-17 22:03:53 +02:00
;; ------------------------------------------------------------------------
;; Better bullet points.
;; ------------------------------------------------------------------------
2018-02-04 18:13:57 +01:00
2018-04-17 22:03:53 +02:00
(font-lock-add-keywords 'org-mode
'(("^ +\\(*\\) "
(0 (prog1 ()
(compose-region (match-beginning 1)
(match-end 1)
""))))))
2018-02-04 18:13:57 +01:00
2018-04-17 22:03:53 +02:00
;; ------------------------------------------------------------------------
;; LaTeX font size.
;; ------------------------------------------------------------------------
2019-02-10 11:35:48 +01:00
(plist-put org-format-latex-options :scale 2.0)
;; ------------------------------------------------------------------------
;; Load agenda-files.
;; ------------------------------------------------------------------------
(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 01:29:39 +02:00
;; ------------------------------------------------------------------------
;; Better header bullets
;; ------------------------------------------------------------------------
2018-04-17 22:03:53 +02:00
2018-07-08 01:29:39 +02:00
(use-package org-bullets
2019-02-10 11:35:48 +01:00
:hook (org-mode . org-bullets-mode))
2018-02-04 18:13:57 +01:00
2019-02-10 10:56:01 +01:00
;; --------------------------------------------------------------------------
;; Org-noter.
;; --------------------------------------------------------------------------
(use-package org-noter
:defer t)
2018-02-04 18:13:57 +01:00
)
2018-07-07 22:34:00 +02:00
(provide 'em-org)
;;; em-org.el ends here