2015-04-11 04:13:02 +00:00
|
|
|
|
;;; packages.el --- Org Layer packages File for Spacemacs
|
|
|
|
|
;;
|
2016-01-12 02:40:54 +00:00
|
|
|
|
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
|
2015-04-11 04:13:02 +00:00
|
|
|
|
;;
|
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
|
;;
|
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
|
;;
|
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
|
2015-04-19 03:40:24 +00:00
|
|
|
|
(setq org-packages
|
2015-04-11 04:13:02 +00:00
|
|
|
|
'(
|
2015-08-27 01:55:28 +00:00
|
|
|
|
company
|
|
|
|
|
company-emoji
|
|
|
|
|
emoji-cheat-sheet-plus
|
2015-10-08 16:18:35 +00:00
|
|
|
|
(evil-org :location local)
|
2015-11-05 16:34:06 +00:00
|
|
|
|
evil-surround
|
2015-12-09 11:29:19 +00:00
|
|
|
|
flyspell
|
2015-09-08 01:31:14 +00:00
|
|
|
|
gnuplot
|
2015-06-01 04:12:30 +00:00
|
|
|
|
htmlize
|
2016-01-12 04:20:20 +00:00
|
|
|
|
mu4e
|
2015-11-17 18:52:20 +00:00
|
|
|
|
;; org and org-agenda are installed by `org-plus-contrib'
|
2015-09-24 02:03:38 +00:00
|
|
|
|
(org :location built-in)
|
2015-11-17 18:52:20 +00:00
|
|
|
|
(org-agenda :location built-in)
|
2015-09-25 05:02:02 +00:00
|
|
|
|
(org-plus-contrib :step pre)
|
2015-04-11 04:13:02 +00:00
|
|
|
|
org-bullets
|
2015-09-24 02:04:07 +00:00
|
|
|
|
;; org-mime is installed by `org-plus-contrib'
|
|
|
|
|
(org-mime :location built-in)
|
2015-04-11 04:13:02 +00:00
|
|
|
|
org-pomodoro
|
2015-05-14 04:17:12 +00:00
|
|
|
|
org-present
|
2015-04-11 04:13:02 +00:00
|
|
|
|
org-repo-todo
|
2015-11-09 04:51:29 +00:00
|
|
|
|
persp-mode
|
2015-06-08 21:07:43 +00:00
|
|
|
|
toc-org
|
2015-04-19 03:40:24 +00:00
|
|
|
|
))
|
2015-04-13 07:38:01 +00:00
|
|
|
|
|
2015-08-27 01:55:28 +00:00
|
|
|
|
(when (configuration-layer/layer-usedp 'auto-completion)
|
|
|
|
|
(defun org/post-init-company ()
|
|
|
|
|
(spacemacs|add-company-hook org-mode)
|
|
|
|
|
(push 'company-capf company-backends-org-mode))
|
|
|
|
|
(defun org/post-init-company-emoji ()
|
|
|
|
|
(push 'company-emoji company-backends-org-mode)))
|
|
|
|
|
|
|
|
|
|
(defun org/post-init-emoji-cheat-sheet-plus ()
|
|
|
|
|
(add-hook 'org-mode-hook 'spacemacs/delay-emoji-cheat-sheet-hook))
|
|
|
|
|
|
2015-04-11 04:13:02 +00:00
|
|
|
|
(defun org/init-evil-org ()
|
|
|
|
|
(use-package evil-org
|
|
|
|
|
:commands evil-org-mode
|
|
|
|
|
:init
|
|
|
|
|
(add-hook 'org-mode-hook 'evil-org-mode)
|
|
|
|
|
:config
|
|
|
|
|
(progn
|
2015-11-18 00:38:05 +00:00
|
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'org-mode
|
|
|
|
|
"C" 'evil-org-recompute-clocks)
|
2015-04-13 08:09:50 +00:00
|
|
|
|
(evil-define-key 'normal evil-org-mode-map
|
2015-05-08 03:06:38 +00:00
|
|
|
|
"O" 'evil-open-above)
|
2015-04-11 04:13:02 +00:00
|
|
|
|
(spacemacs|diminish evil-org-mode " ⓔ" " e"))))
|
|
|
|
|
|
2015-11-05 16:34:06 +00:00
|
|
|
|
(defun org/post-init-evil-surround ()
|
|
|
|
|
(defun spacemacs/add-org-surrounds ()
|
|
|
|
|
(push '(?: . spacemacs//surround-drawer) evil-surround-pairs-alist))
|
|
|
|
|
(add-hook 'org-mode-hook 'spacemacs/add-org-surrounds)
|
|
|
|
|
(defun spacemacs//surround-drawer ()
|
|
|
|
|
(let ((dname (read-from-minibuffer "" "")))
|
2015-12-13 15:44:00 +00:00
|
|
|
|
(cons (format ":%s:\n" (or dname "")) "\n:END:"))))
|
2015-11-05 16:34:06 +00:00
|
|
|
|
|
2015-12-09 11:29:19 +00:00
|
|
|
|
(defun org/post-init-flyspell ()
|
|
|
|
|
(spell-checking/add-flyspell-hook 'org-mode-hook))
|
|
|
|
|
|
2015-09-08 01:31:14 +00:00
|
|
|
|
(defun org/init-gnuplot ()
|
|
|
|
|
(use-package gnuplot
|
2015-09-10 02:24:17 +00:00
|
|
|
|
:defer t
|
2015-11-18 00:38:05 +00:00
|
|
|
|
:init (spacemacs/set-leader-keys-for-major-mode 'org-mode
|
|
|
|
|
"tp" 'org-plot/gnuplot)))
|
2015-09-08 01:31:14 +00:00
|
|
|
|
|
2016-01-12 04:20:20 +00:00
|
|
|
|
(defun org/pre-init-mu4e ()
|
|
|
|
|
;; Load org-mu4e when mu4e is actually loaded
|
|
|
|
|
(spacemacs|use-package-add-hook mu4e
|
2016-01-12 05:08:51 +00:00
|
|
|
|
:post-config (require 'org-mu4e nil 'noerror)))
|
2016-01-12 04:20:20 +00:00
|
|
|
|
|
2015-09-24 02:03:38 +00:00
|
|
|
|
;; dummy init function to force installation of `org-plus-contrib'
|
|
|
|
|
(defun org/init-org-plus-contrib ())
|
|
|
|
|
|
2015-04-11 04:13:02 +00:00
|
|
|
|
(defun org/init-org ()
|
|
|
|
|
(use-package org
|
|
|
|
|
:mode ("\\.org$" . org-mode)
|
2015-10-12 18:22:32 +00:00
|
|
|
|
:commands (org-clock-out org-occur-in-agenda-files)
|
2015-04-11 04:13:02 +00:00
|
|
|
|
:defer t
|
|
|
|
|
:init
|
|
|
|
|
(progn
|
2015-11-24 14:43:18 +00:00
|
|
|
|
;; FIXME: This check has been disabled pending a resolution of
|
|
|
|
|
;; https://github.com/syl20bnr/spacemacs/issues/3933
|
|
|
|
|
;; (when (featurep 'org)
|
|
|
|
|
;; (configuration-layer//set-error)
|
|
|
|
|
;; (spacemacs-buffer/append
|
|
|
|
|
;; (concat
|
|
|
|
|
;; "Org features were loaded before the `org' layer initialized.\n"
|
|
|
|
|
;; "Try removing org code from user initialization and private layers.") t))
|
2015-11-23 19:15:09 +00:00
|
|
|
|
|
2015-06-16 02:28:36 +00:00
|
|
|
|
(setq org-clock-persist-file
|
|
|
|
|
(concat spacemacs-cache-directory "org-clock-save.el")
|
2015-10-12 07:11:42 +00:00
|
|
|
|
org-id-locations-file
|
|
|
|
|
(concat spacemacs-cache-directory ".org-id-locations")
|
2015-06-16 02:28:36 +00:00
|
|
|
|
org-log-done t
|
2015-06-15 21:23:42 +00:00
|
|
|
|
org-startup-with-inline-images t
|
2016-01-11 18:16:07 +00:00
|
|
|
|
org-src-fontify-natively t
|
|
|
|
|
;; this is consistent with the value of
|
|
|
|
|
;; `helm-org-headings-max-depth'.
|
|
|
|
|
org-imenu-depth 8)
|
2015-04-11 04:38:31 +00:00
|
|
|
|
|
2015-09-29 05:07:57 +00:00
|
|
|
|
(with-eval-after-load 'org-indent
|
|
|
|
|
(spacemacs|hide-lighter org-indent-mode))
|
2015-04-15 21:24:55 +00:00
|
|
|
|
(setq org-startup-indented t)
|
2015-05-16 04:57:13 +00:00
|
|
|
|
(let ((dir (configuration-layer/get-layer-property 'org :dir)))
|
|
|
|
|
(setq org-export-async-init-file (concat dir "org-async-init.el")))
|
2015-04-13 08:09:50 +00:00
|
|
|
|
(defmacro spacemacs|org-emphasize (fname char)
|
2015-04-14 20:36:02 +00:00
|
|
|
|
"Make function for setting the emphasis in org mode"
|
2015-04-13 08:09:50 +00:00
|
|
|
|
`(defun ,fname () (interactive)
|
2015-05-08 03:06:38 +00:00
|
|
|
|
(org-emphasize ,char)))
|
2015-05-13 17:15:14 +00:00
|
|
|
|
|
|
|
|
|
;; Insert key for org-mode and markdown a la C-h k
|
|
|
|
|
;; from SE endless http://emacs.stackexchange.com/questions/2206/i-want-to-have-the-kbd-tags-for-my-blog-written-in-org-mode/2208#2208
|
|
|
|
|
(defun spacemacs/insert-keybinding-org (key)
|
|
|
|
|
"Ask for a key then insert its description.
|
|
|
|
|
Will work on both org-mode and any mode that accepts plain html."
|
|
|
|
|
(interactive "kType key sequence: ")
|
|
|
|
|
(let* ((tag "@@html:<kbd>@@ %s @@html:</kbd>@@"))
|
|
|
|
|
(if (null (equal key "\r"))
|
|
|
|
|
(insert
|
|
|
|
|
(format tag (help-key-description key nil)))
|
|
|
|
|
(insert (format tag ""))
|
|
|
|
|
(forward-char -8))))
|
2015-11-18 00:38:05 +00:00
|
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'org-mode
|
|
|
|
|
"'" 'org-edit-special
|
|
|
|
|
"c" 'org-capture
|
|
|
|
|
"d" 'org-deadline
|
2015-12-13 15:44:00 +00:00
|
|
|
|
"D" 'org-insert-drawer
|
2015-11-18 00:38:05 +00:00
|
|
|
|
"e" 'org-export-dispatch
|
|
|
|
|
"f" 'org-set-effort
|
|
|
|
|
"P" 'org-set-property
|
|
|
|
|
":" 'org-set-tags
|
|
|
|
|
|
|
|
|
|
"a" 'org-agenda
|
|
|
|
|
"b" 'org-tree-to-indirect-buffer
|
|
|
|
|
"A" 'org-archive-subtree
|
|
|
|
|
"l" 'org-open-at-point
|
|
|
|
|
"T" 'org-show-todo-tree
|
|
|
|
|
|
|
|
|
|
"." 'org-time-stamp
|
2015-12-07 10:39:15 +00:00
|
|
|
|
"!" 'org-time-stamp-inactive
|
2015-09-16 20:08:55 +00:00
|
|
|
|
|
2015-05-08 03:06:38 +00:00
|
|
|
|
;; headings
|
2015-11-18 00:38:05 +00:00
|
|
|
|
"hi" 'org-insert-heading-after-current
|
|
|
|
|
"hI" 'org-insert-heading
|
2015-05-08 03:06:38 +00:00
|
|
|
|
|
2015-12-06 06:14:53 +00:00
|
|
|
|
;; More cycling options (timestamps, headlines, items, properties)
|
|
|
|
|
"L" 'org-shiftright
|
|
|
|
|
"H" 'org-shiftleft
|
|
|
|
|
"J" 'org-shiftdown
|
|
|
|
|
"K" 'org-shiftup
|
|
|
|
|
|
2015-09-16 20:08:55 +00:00
|
|
|
|
;; Change between TODO sets
|
2015-11-18 00:38:05 +00:00
|
|
|
|
"C-S-l" 'org-shiftcontrolright
|
|
|
|
|
"C-S-h" 'org-shiftcontrolleft
|
|
|
|
|
"C-S-j" 'org-shiftcontroldown
|
|
|
|
|
"C-S-k" 'org-shiftcontrolup
|
2015-09-16 20:08:55 +00:00
|
|
|
|
|
|
|
|
|
;; Subtree editing
|
2015-11-18 00:38:05 +00:00
|
|
|
|
"Sl" 'org-demote-subtree
|
|
|
|
|
"Sh" 'org-promote-subtree
|
|
|
|
|
"Sj" 'org-move-subtree-down
|
|
|
|
|
"Sk" 'org-move-subtree-up
|
2015-09-16 20:08:55 +00:00
|
|
|
|
|
2015-09-08 01:34:45 +00:00
|
|
|
|
;; tables
|
2015-11-18 00:38:05 +00:00
|
|
|
|
"ta" 'org-table-align
|
|
|
|
|
"tb" 'org-table-blank-field
|
|
|
|
|
"tc" 'org-table-convert
|
|
|
|
|
"tdc" 'org-table-delete-column
|
|
|
|
|
"tdr" 'org-table-kill-row
|
|
|
|
|
"te" 'org-table-eval-formula
|
|
|
|
|
"tE" 'org-table-export
|
|
|
|
|
"th" 'org-table-previous-field
|
|
|
|
|
"tH" 'org-table-move-column-left
|
|
|
|
|
"tic" 'org-table-insert-column
|
|
|
|
|
"tih" 'org-table-insert-hline
|
|
|
|
|
"tiH" 'org-table-hline-and-move
|
|
|
|
|
"tir" 'org-table-insert-row
|
|
|
|
|
"tI" 'org-table-import
|
|
|
|
|
"tj" 'org-table-next-row
|
|
|
|
|
"tJ" 'org-table-move-row-down
|
|
|
|
|
"tK" 'org-table-move-row-up
|
|
|
|
|
"tl" 'org-table-next-field
|
|
|
|
|
"tL" 'org-table-move-column-right
|
|
|
|
|
"tn" 'org-table-create
|
|
|
|
|
"tN" 'org-table-create-with-table.el
|
|
|
|
|
"tr" 'org-table-recalculate
|
|
|
|
|
"ts" 'org-table-sort-lines
|
|
|
|
|
"ttf" 'org-table-toggle-formula-debugger
|
|
|
|
|
"tto" 'org-table-toggle-coordinate-overlays
|
|
|
|
|
"tw" 'org-table-wrap-region
|
2015-09-08 01:34:45 +00:00
|
|
|
|
|
2015-11-05 16:33:46 +00:00
|
|
|
|
;; Multi-purpose keys
|
2015-11-21 18:38:55 +00:00
|
|
|
|
(or dotspacemacs-major-mode-leader-key ",") 'org-ctrl-c-ctrl-c
|
2015-11-18 00:38:05 +00:00
|
|
|
|
"*" 'org-ctrl-c-star
|
|
|
|
|
"RET" 'org-ctrl-c-ret
|
|
|
|
|
"-" 'org-ctrl-c-minus
|
|
|
|
|
"^" 'org-sort
|
|
|
|
|
"/" 'org-sparse-tree
|
|
|
|
|
|
|
|
|
|
"I" 'org-clock-in
|
|
|
|
|
"n" 'org-narrow-to-subtree
|
|
|
|
|
"N" 'widen
|
|
|
|
|
"O" 'org-clock-out
|
|
|
|
|
"q" 'org-clock-cancel
|
|
|
|
|
"R" 'org-refile
|
|
|
|
|
"s" 'org-schedule
|
2015-11-05 16:33:46 +00:00
|
|
|
|
|
|
|
|
|
;; insertion of common elements
|
2015-11-18 00:38:05 +00:00
|
|
|
|
"il" 'org-insert-link
|
|
|
|
|
"if" 'org-footnote-new
|
|
|
|
|
"ik" 'spacemacs/insert-keybinding-org
|
2015-11-05 16:33:46 +00:00
|
|
|
|
|
|
|
|
|
;; images and other link types have no commands in org mode-line
|
|
|
|
|
;; could be inserted using yasnippet?
|
|
|
|
|
;; region manipulation
|
2015-11-21 18:33:11 +00:00
|
|
|
|
"xb" (spacemacs|org-emphasize spacemacs/org-bold ?*)
|
|
|
|
|
"xc" (spacemacs|org-emphasize spacemacs/org-code ?~)
|
|
|
|
|
"xi" (spacemacs|org-emphasize spacemacs/org-italic ?/)
|
|
|
|
|
"xr" (spacemacs|org-emphasize spacemacs/org-clear ? )
|
|
|
|
|
"xs" (spacemacs|org-emphasize spacemacs/org-strike-through ?+)
|
|
|
|
|
"xu" (spacemacs|org-emphasize spacemacs/org-underline ?_)
|
|
|
|
|
"xv" (spacemacs|org-emphasize spacemacs/org-verbose ?=))
|
2015-04-11 04:13:02 +00:00
|
|
|
|
|
2015-09-29 05:07:57 +00:00
|
|
|
|
(with-eval-after-load 'org-agenda
|
|
|
|
|
(define-key org-agenda-mode-map "j" 'org-agenda-next-line)
|
|
|
|
|
(define-key org-agenda-mode-map "k" 'org-agenda-previous-line)
|
|
|
|
|
;; Since we override SPC, let's make RET do that functionality
|
|
|
|
|
(define-key org-agenda-mode-map
|
|
|
|
|
(kbd "RET") 'org-agenda-show-and-scroll-up)
|
|
|
|
|
(define-key org-agenda-mode-map
|
2015-11-18 00:38:05 +00:00
|
|
|
|
(kbd "SPC") spacemacs-default-map))
|
2015-10-12 18:22:32 +00:00
|
|
|
|
|
|
|
|
|
;; Add global evil-leader mappings. Used to access org-agenda
|
|
|
|
|
;; functionalities – and a few others commands – from any other mode.
|
2015-11-09 20:26:39 +00:00
|
|
|
|
(spacemacs/declare-prefix "ao" "org")
|
2015-11-18 00:38:05 +00:00
|
|
|
|
(spacemacs/set-leader-keys
|
2015-10-12 18:22:32 +00:00
|
|
|
|
;; org-agenda
|
|
|
|
|
"ao#" 'org-agenda-list-stuck-projects
|
|
|
|
|
"ao/" 'org-occur-in-agenda-files
|
|
|
|
|
"aoa" 'org-agenda-list
|
|
|
|
|
"aoe" 'org-store-agenda-views
|
|
|
|
|
"aom" 'org-tags-view
|
|
|
|
|
"aoo" 'org-agenda
|
|
|
|
|
"aos" 'org-search-view
|
|
|
|
|
"aot" 'org-todo-list
|
|
|
|
|
;; other
|
|
|
|
|
"aoO" 'org-clock-out
|
|
|
|
|
"aoc" 'org-capture
|
|
|
|
|
"aol" 'org-store-link))
|
2015-04-11 04:13:02 +00:00
|
|
|
|
:config
|
|
|
|
|
(progn
|
2015-08-31 03:57:05 +00:00
|
|
|
|
;; setup org directory
|
|
|
|
|
(unless (file-exists-p org-directory)
|
|
|
|
|
(make-directory org-directory))
|
2015-05-13 17:15:14 +00:00
|
|
|
|
(font-lock-add-keywords
|
|
|
|
|
'org-mode '(("\\(@@html:<kbd>@@\\) \\(.*\\) \\(@@html:</kbd>@@\\)"
|
|
|
|
|
(1 font-lock-comment-face prepend)
|
|
|
|
|
(2 font-lock-function-name-face)
|
|
|
|
|
(3 font-lock-comment-face prepend))))
|
2015-06-10 19:05:31 +00:00
|
|
|
|
|
2015-04-13 06:01:49 +00:00
|
|
|
|
(require 'org-indent)
|
2015-04-11 04:13:02 +00:00
|
|
|
|
(define-key global-map "\C-cl" 'org-store-link)
|
2015-04-13 08:09:50 +00:00
|
|
|
|
(define-key global-map "\C-ca" 'org-agenda)
|
2015-06-03 03:27:00 +00:00
|
|
|
|
|
2015-10-05 11:40:47 +00:00
|
|
|
|
;; Open links and files with RET in normal state
|
|
|
|
|
(evil-define-key 'normal org-mode-map (kbd "RET") 'org-open-at-point)
|
|
|
|
|
|
2015-06-03 03:27:00 +00:00
|
|
|
|
;; We add this key mapping because an Emacs user can change
|
|
|
|
|
;; `dotspacemacs-major-mode-emacs-leader-key' to `C-c' and the key binding
|
|
|
|
|
;; C-c ' is shadowed by `spacemacs/default-pop-shell', effectively making
|
|
|
|
|
;; the Emacs user unable to exit src block editing.
|
|
|
|
|
(define-key org-src-mode-map (kbd (concat dotspacemacs-major-mode-emacs-leader-key " '")) 'org-edit-src-exit)
|
|
|
|
|
|
2015-11-18 00:38:05 +00:00
|
|
|
|
(spacemacs/set-leader-keys
|
2015-11-17 18:52:20 +00:00
|
|
|
|
"Cc" 'org-capture)
|
|
|
|
|
|
|
|
|
|
;; Evilify the calendar tool on C-c .
|
|
|
|
|
(unless (eq 'emacs dotspacemacs-editing-style)
|
|
|
|
|
(define-key org-read-date-minibuffer-local-map (kbd "M-h")
|
|
|
|
|
(lambda () (interactive) (org-eval-in-calendar '(calendar-backward-day 1))))
|
|
|
|
|
(define-key org-read-date-minibuffer-local-map (kbd "M-l")
|
|
|
|
|
(lambda () (interactive) (org-eval-in-calendar '(calendar-forward-day 1))))
|
|
|
|
|
(define-key org-read-date-minibuffer-local-map (kbd "M-k")
|
|
|
|
|
(lambda () (interactive) (org-eval-in-calendar '(calendar-backward-week 1))))
|
|
|
|
|
(define-key org-read-date-minibuffer-local-map (kbd "M-j")
|
|
|
|
|
(lambda () (interactive) (org-eval-in-calendar '(calendar-forward-week 1))))
|
|
|
|
|
(define-key org-read-date-minibuffer-local-map (kbd "M-H")
|
|
|
|
|
(lambda () (interactive) (org-eval-in-calendar '(calendar-backward-month 1))))
|
|
|
|
|
(define-key org-read-date-minibuffer-local-map (kbd "M-L")
|
|
|
|
|
(lambda () (interactive) (org-eval-in-calendar '(calendar-forward-month 1))))
|
|
|
|
|
(define-key org-read-date-minibuffer-local-map (kbd "M-K")
|
|
|
|
|
(lambda () (interactive) (org-eval-in-calendar '(calendar-backward-year 1))))
|
|
|
|
|
(define-key org-read-date-minibuffer-local-map (kbd "M-J")
|
|
|
|
|
(lambda () (interactive) (org-eval-in-calendar '(calendar-forward-year 1))))))))
|
|
|
|
|
|
|
|
|
|
(defun org/init-org-agenda ()
|
|
|
|
|
(use-package org-agenda
|
|
|
|
|
:defer t
|
|
|
|
|
:init
|
|
|
|
|
(setq org-agenda-restore-windows-after-quit t)
|
|
|
|
|
:config
|
|
|
|
|
(evilified-state-evilify-map org-agenda-mode-map
|
|
|
|
|
:mode org-agenda-mode
|
|
|
|
|
:bindings
|
|
|
|
|
"j" 'org-agenda-next-line
|
|
|
|
|
"k" 'org-agenda-previous-line
|
|
|
|
|
(kbd "M-j") 'org-agenda-next-item
|
|
|
|
|
(kbd "M-k") 'org-agenda-previous-item
|
|
|
|
|
(kbd "M-h") 'org-agenda-earlier
|
|
|
|
|
(kbd "M-l") 'org-agenda-later
|
|
|
|
|
(kbd "gd") 'org-agenda-toggle-time-grid
|
|
|
|
|
(kbd "gr") 'org-agenda-redo)))
|
2015-04-11 04:13:02 +00:00
|
|
|
|
|
|
|
|
|
(defun org/init-org-bullets ()
|
|
|
|
|
(use-package org-bullets
|
|
|
|
|
:defer t
|
|
|
|
|
:init (add-hook 'org-mode-hook 'org-bullets-mode)))
|
|
|
|
|
|
2015-09-24 02:04:07 +00:00
|
|
|
|
(defun org/init-org-mime ()
|
|
|
|
|
(use-package org-mime
|
|
|
|
|
:defer t
|
|
|
|
|
:commands (org-mime-htmlize org-mime-org-buffer-htmlize)
|
|
|
|
|
:init
|
|
|
|
|
(progn
|
2015-11-18 00:38:05 +00:00
|
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'message-mode
|
|
|
|
|
"M" 'org-mime-htmlize)
|
|
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'org-mode
|
|
|
|
|
"m" 'org-mime-org-buffer-htmlize))))
|
2015-09-24 02:04:07 +00:00
|
|
|
|
|
2015-04-11 14:44:07 +00:00
|
|
|
|
(defun org/init-org-pomodoro ()
|
2015-04-11 04:13:02 +00:00
|
|
|
|
(use-package org-pomodoro
|
|
|
|
|
:defer t
|
|
|
|
|
:init
|
|
|
|
|
(progn
|
2015-08-23 01:47:30 +00:00
|
|
|
|
(when (spacemacs/system-is-mac)
|
2015-04-11 04:13:02 +00:00
|
|
|
|
(setq org-pomodoro-audio-player "/usr/bin/afplay"))
|
2015-11-18 00:38:05 +00:00
|
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'org-mode
|
|
|
|
|
"p" 'org-pomodoro))))
|
2015-04-11 04:13:02 +00:00
|
|
|
|
|
2015-05-14 04:17:12 +00:00
|
|
|
|
(defun org/init-org-present ()
|
|
|
|
|
(use-package org-present
|
|
|
|
|
:defer t
|
|
|
|
|
:init
|
|
|
|
|
(progn
|
2015-11-21 10:07:14 +00:00
|
|
|
|
(evilified-state-evilify nil org-present-mode-keymap
|
|
|
|
|
"h" 'org-present-prev
|
|
|
|
|
"l" 'org-present-next
|
|
|
|
|
"q" 'org-present-quit)
|
2015-05-14 04:17:12 +00:00
|
|
|
|
(defun spacemacs//org-present-start ()
|
|
|
|
|
"Initiate `org-present' mode"
|
|
|
|
|
(org-present-big)
|
|
|
|
|
(org-display-inline-images)
|
|
|
|
|
(org-present-hide-cursor)
|
|
|
|
|
(org-present-read-only)
|
|
|
|
|
(evil-evilified-state))
|
|
|
|
|
(defun spacemacs//org-present-end ()
|
|
|
|
|
"Terminate `org-present' mode"
|
|
|
|
|
(org-present-small)
|
|
|
|
|
(org-remove-inline-images)
|
|
|
|
|
(org-present-show-cursor)
|
|
|
|
|
(org-present-read-write)
|
|
|
|
|
(evil-normal-state))
|
|
|
|
|
(add-hook 'org-present-mode-hook 'spacemacs//org-present-start)
|
|
|
|
|
(add-hook 'org-present-mode-quit-hook 'spacemacs//org-present-end))))
|
|
|
|
|
|
2015-04-11 04:13:02 +00:00
|
|
|
|
(defun org/init-org-repo-todo ()
|
|
|
|
|
(use-package org-repo-todo
|
2015-09-18 08:25:44 +00:00
|
|
|
|
:defer t
|
2015-04-11 04:13:02 +00:00
|
|
|
|
:init
|
|
|
|
|
(progn
|
2015-11-18 00:38:05 +00:00
|
|
|
|
(spacemacs/set-leader-keys
|
2015-04-11 04:13:02 +00:00
|
|
|
|
"Ct" 'ort/capture-todo
|
2015-09-18 08:25:44 +00:00
|
|
|
|
"CT" 'ort/capture-checkitem)
|
2015-11-18 00:38:05 +00:00
|
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'org-mode
|
|
|
|
|
"gt" 'ort/goto-todos))))
|
2015-04-13 06:01:49 +00:00
|
|
|
|
|
2015-11-09 04:51:29 +00:00
|
|
|
|
(defun org/post-init-persp-mode ()
|
|
|
|
|
(spacemacs|define-custom-layout "@Org"
|
|
|
|
|
:binding "o"
|
|
|
|
|
:body
|
|
|
|
|
(find-file (first org-agenda-files))))
|
|
|
|
|
|
2015-06-08 21:07:43 +00:00
|
|
|
|
(defun org/init-toc-org ()
|
|
|
|
|
(use-package toc-org
|
2015-08-01 19:24:21 +00:00
|
|
|
|
:defer t
|
2015-06-08 21:07:43 +00:00
|
|
|
|
:init
|
2015-08-01 05:00:38 +00:00
|
|
|
|
(progn
|
|
|
|
|
(setq toc-org-max-depth 10)
|
|
|
|
|
(add-hook 'org-mode-hook 'toc-org-enable))))
|
2015-06-08 21:07:43 +00:00
|
|
|
|
|
2015-04-21 05:50:21 +00:00
|
|
|
|
(defun org/init-htmlize ()
|
|
|
|
|
(use-package htmlize
|
|
|
|
|
:defer t))
|