From b776127e4c81e2ec8e7d3f265910d89c3c52a895 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Tue, 26 Feb 2019 14:23:16 +0100 Subject: [PATCH] Update Org config to use :custom instead of setq calls --- configuration.org | 83 ++++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/configuration.org b/configuration.org index cb8fac6..8d1b68e 100644 --- a/configuration.org +++ b/configuration.org @@ -2630,19 +2630,8 @@ This is a big one; I use a lot of customisation here. `(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?:X\\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)" 12 'org-checkbox-done-text prepend)) 'append) (setq org-directory (expand-file-name "NextCloud/orgmode" user-documents-directory)) - (setq-default org-crypt-key "B0740C4C" - org-default-notes-file (expand-file-name "notes.org" org-directory) + (setq-default org-default-notes-file (expand-file-name "notes.org" org-directory) org-agenda-files `(,org-directory) - org-ellipsis "…#" - org-startup-folded 'content - org-log-done 'time - org-src-preserve-indentation t - org-log-into-drawer t - org-tags-column 0 - org-startup-indented t - org-special-ctrl-a/e t - org-return-follows-link t - org-src-fontify-natively t org-time-stamp-formats '("<%Y-%m-%d>" . "<%Y-%m-%d %H:%M>") org-todo-keywords '((sequence "TODO(t)" "DOING(w@/!)" @@ -2652,41 +2641,26 @@ This is a big one; I use a lot of customisation here. "CANCELED(c@/!)" "REVIEW(r@/!)" "DONE(d@/!)")) - org-todo-keyword-faces '( - ("SOMEDAY" . (:foreground "goldenrod")) + org-todo-keyword-faces '(("SOMEDAY" . (:foreground "goldenrod")) ("CANCELED" . (:foreground "#228b22" :strike-through t))) - org-goto-interface 'outline-path-completion - org-goto-max-level 10 - org-html-checkbox-type 'unicode org-html-checkbox-types '((unicode (on . "") (off . "") (trans . ""))) - org-src-window-setup 'current-window - org-pretty-entities t - org-pretty-entities-include-sub-superscripts t - org-use-speed-commands t org-speed-commands-user '(("m" . org-mark-subtree)) - org-hide-leading-stars t - org-enforce-todo-dependencies t - org-catch-invisible-edits 'show - org-log-reschedule 'time - org-log-redeadline 'note org-refile-targets '((org-agenda-files :maxlevel . 3)) - org-refile-use-outline-path 'file - org-outline-path-complete-in-steps nil - org-refile-allow-creating-parent-nodes 'confirm - org-agenda-custom-commands '(("c" "Simple agenda view" ((tags "PRIORITY=\"A\"" - ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) - (org-agenda-overriding-header "High priority unfinished tasks"))) - (agenda "") - (alltodo "" - ((org-agenda-skip-function - '(or (air-org-skip-subtree-if-habit) - (air-org-skip-subtree-if-priority ?A) - (gpolonkai/org-skip-subtree-if-state "SOMEDAY") - (org-agenda-skip-if nil '(scheduled deadline)))) - (org-agenda-overriding-header "ALL normal priority tasks")))) + org-agenda-custom-commands '(("c" "Simple agenda view" + ((tags "PRIORITY=\"A\"" + ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) + (org-agenda-overriding-header "High priority unfinished tasks"))) + (agenda "") + (alltodo "" + ((org-agenda-skip-function + '(or (air-org-skip-subtree-if-habit) + (air-org-skip-subtree-if-priority ?A) + (gpolonkai/org-skip-subtree-if-state "SOMEDAY") + (org-agenda-skip-if nil '(scheduled deadline)))) + (org-agenda-overriding-header "ALL normal priority tasks")))) ((org-agenda-compact-blocks t)))) org-log-note-clock-out t) :config @@ -2699,6 +2673,8 @@ This is a big one; I use a lot of customisation here. ;; Handle org-protocol:// links (require 'org-protocol) + ;; Make it possible to encrypt headings + (require 'org-crypt) ;; Set up capture templates for blog posts and GT2 related notes (add-to-list 'org-capture-templates @@ -2731,6 +2707,33 @@ This is a big one; I use a lot of customisation here. (file+headline (lambda () (expand-file-name "index.org" org-directory)) "Captures") "** %:description\n:PROPERTIES:\n:SOURCE: %:link\n:END:\n\n%:initial" :empty-lines 1)) + :custom + (org-log-into-drawer t) + (org-ellipsis "…#") + (org-startup-folded 'content) + (org-log-done 'time) + (org-src-preserve-indentation t) + (org-tags-column 0) + (org-startup-indented t) + (org-special-ctrl-a/e t) + (org-return-follows-link t) + (org-src-fontify-natively t) + (org-goto-interface 'outline-path-completion) + (org-goto-max-level 10) + (org-html-checkbox-type 'unicode) + (org-src-window-setup 'current-window) + (org-pretty-entities t) + (org-pretty-entities-include-sub-superscripts t) + (org-use-speed-commands t) + (org-hide-leading-stars t) + (org-enforce-todo-dependencies t) + (org-catch-invisible-edits 'show) + (org-log-reschedule 'time) + (org-log-redeadline 'note) + (org-refile-use-outline-path 'file) + (org-outline-path-complete-in-steps nil) + (org-refile-allow-creating-parent-nodes 'confirm) + (org-crypt-key "B0740C4C") :hook (ediff-select . f-ediff-org-unfold-tree-element) (ediff-unselect . f-ediff-org-fold-tree)