Refactor configuration of Org-mode

Now everything is set during :init (which may or may not be a good idea.)
This commit is contained in:
Gergely Polonkai 2018-08-09 13:48:27 +02:00
parent a64603bad9
commit 21604ca994

View File

@ -2273,21 +2273,10 @@ This is a big one; I use a lot of customisation here.
org-log-into-drawer t org-log-into-drawer t
org-tags-column 0 org-tags-column 0
org-startup-indented t org-startup-indented t
org-special-ctrl-a/e t) org-special-ctrl-a/e t
:config org-return-follows-link t
(require 'ox-md) org-src-fontify-natively t
(unless (boundp 'org-capture-templates) org-time-stamp-formats '("<%Y-%m-%d>" . "<%Y-%m-%d %H:%M>")
(setq org-capture-templates nil))
(add-to-list 'org-capture-templates
'("p" "Blog post"
entry (file+olp+datetree (concat org-directory "blog.org"))
"* %^{Title} :blog:\n :PROPERTIES:\n :on: %T\n :END:\n %i%?"))
(add-to-list 'org-capture-templates
'("g" "GT2 note"
entry (file+headline (concat org-directory "gt2-notes.org")
"Captures")
"** %^{Title}\n :PROPERTIES:\n :on: %T\n :END:\n %i%?"))
(setq org-time-stamp-formats '("<%Y-%m-%d>" . "<%Y-%m-%d %H:%M>")
org-todo-keywords '((sequence "TODO(t)" org-todo-keywords '((sequence "TODO(t)"
"DOING(w@/!)" "DOING(w@/!)"
"BLOCKED(b@/!)" "BLOCKED(b@/!)"
@ -2303,6 +2292,19 @@ This is a big one; I use a lot of customisation here.
(off . "<span class=\"task-todo\">☐</span>") (off . "<span class=\"task-todo\">☐</span>")
(trans . "<span class=\"task-in-progress\">▣</span>"))) (trans . "<span class=\"task-in-progress\">▣</span>")))
org-src-window-setup 'current-window) org-src-window-setup 'current-window)
:config
(require 'ox-md)
(unless (boundp 'org-capture-templates)
(setq org-capture-templates nil))
(add-to-list 'org-capture-templates
'("p" "Blog post"
entry (file+olp+datetree (concat org-directory "blog.org"))
"* %^{Title} :blog:\n :PROPERTIES:\n :on: %T\n :END:\n %i%?"))
(add-to-list 'org-capture-templates
'("g" "GT2 note"
entry (file+headline (concat org-directory "gt2-notes.org")
"Captures")
"** %^{Title}\n :PROPERTIES:\n :on: %T\n :END:\n %i%?"))
(add-hook 'ediff-select-hook 'f-ediff-org-unfold-tree-element) (add-hook 'ediff-select-hook 'f-ediff-org-unfold-tree-element)
(add-hook 'ediff-unselect-hook 'f-ediff-org-fold-tree) (add-hook 'ediff-unselect-hook 'f-ediff-org-fold-tree)
:bind :bind