diff --git a/config.org b/config.org index a3f578e..a76b11a 100644 --- a/config.org +++ b/config.org @@ -849,7 +849,6 @@ If the property is already set, replace its value." (point-max) t) (replace-match "")))) - (use-package org :ensure t :mode (("\.org$" . org-mode)) @@ -858,10 +857,6 @@ If the property is already set, replace its value." :hook (org-mode . org-indent-mode) (org-source-mode . smartparens-mode) -; :init -; (add-hook 'org-mode-hook 'company/org-mode-hook) -; (add-hook 'org-src-mode-hook 'smartparens-mode) -; (add-hook 'org-mode-hook 'org-indent-mode) :bind (("C-c l" . org-store-link) ("C-c c" . org-capture) ("C-c a" . org-agenda) @@ -884,15 +879,6 @@ Necessary when updating roam agenda todos." (directory-files-recursively MY--PATH_ORG_FILES_MOBILE "\\.org$")))) (my--org-agenda-files-set) :config - (setq org-modules (quote (org-id - org-habit - org-tempo ;; easy templates - ))) - (setq org-default-notes-file (concat MY--PATH_ORG_FILES "notes.org")) - (setq org-id-locations-file (concat MY--PATH_USER_LOCAL ".org-id-locations") - org-log-into-drawer "LOGBOOK") - (setq org-log-done 'time ;; create timestamp when task is done - org-blank-before-new-entry '((heading) (plain-list-item))) ;; prevent new line before new item :custom (org-pretty-entities t) (org-startup-truncated t) @@ -900,28 +886,38 @@ Necessary when updating roam agenda todos." (org-src-fontify-natively t) ;; use syntax highlighting in code blocks (org-src-preserve-indentation t) ;; no extra indentation (org-src-window-setup 'current-window) ;; C-c ' opens in current window - (org-src-tab-acts-natively t) - ) + (org-modules (quote (org-id + org-habit + org-tempo))) ;; easy templates + (org-default-notes-file (concat MY--PATH_ORG_FILES "notes.org")) + (org-id-locations-file (concat MY--PATH_USER_LOCAL ".org-id-locations")) + (org-log-into-drawer "LOGBOOK") + (org-log-done 'time) ;; create timestamp when task is done + (org-blank-before-new-entry '((heading) (plain-list-item))) ;; prevent new line before new item + (org-src-tab-acts-natively t)) #+END_SRC -** org-agenda Custom keywords, depending on environment #+BEGIN_SRC emacs-lisp (use-package org :if *work_remote* - :config - (setq org-todo-keywords - '((sequence "OPEN" "TODO" "UNCLEAR" "|" "DONE" "IMPOSSIBLE" "CANCELLED")))) + :custom + (org-todo-keywords + '((sequence "OPEN" "TODO" "UNCLEAR" "|" "DONE" "IMPOSSIBLE" "CANCELLED")))) #+END_SRC +** org-agenda Sort agenda by deadline and priority #+BEGIN_SRC emacs-lisp -(setq org-agenda-sorting-strategy - (quote - ((agenda deadline-up priority-down) - (todo priority-down category-keep) - (tags priority-down category-keep) - (search category-keep)))) +(use-package org + :ensure t + :custom + (org-agenda-sorting-strategy + (quote + ((agenda deadline-up priority-down) + (todo priority-down category-keep) + (tags priority-down category-keep) + (search category-keep))))) #+END_SRC Customize the org agenda @@ -936,20 +932,22 @@ Customize the org agenda (if (= pri-value pri-current) subtree-end nil))) - -(setq 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 "Hohe Priorität:"))) - (agenda "" - ((org-agenda-span 7) - (org-agenda-start-on-weekday nil) - (org-agenda-overriding-header "Nächste 7 Tage:"))) - (alltodo "" - ((org-agenda-skip-function '(or (my--org-skip-subtree-if-priority ?A) - (org-agenda-skip-if nil '(scheduled deadline)))) - (org-agenda-overriding-header "Sonstige Aufgaben:"))))))) +(use-package org + :ensure t + :custom + (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 "Hohe Priorität:"))) + (agenda "" + ((org-agenda-span 7) + (org-agenda-start-on-weekday nil) + (org-agenda-overriding-header "Nächste 7 Tage:"))) + (alltodo "" + ((org-agenda-skip-function '(or (my--org-skip-subtree-if-priority ?A) + (org-agenda-skip-if nil '(scheduled deadline)))) + (org-agenda-overriding-header "Sonstige Aufgaben:")))))))) #+END_SRC ** languages