|
@ -862,9 +862,17 @@ If the property is already set, replace its value." |
|
|
; (add-hook 'org-mode-hook 'company/org-mode-hook) |
|
|
; (add-hook 'org-mode-hook 'company/org-mode-hook) |
|
|
; (add-hook 'org-src-mode-hook 'smartparens-mode) |
|
|
; (add-hook 'org-src-mode-hook 'smartparens-mode) |
|
|
; (add-hook 'org-mode-hook 'org-indent-mode) |
|
|
; (add-hook 'org-mode-hook 'org-indent-mode) |
|
|
:bind (:map org-mode-map ("S-<right>" . org-shiftright) |
|
|
|
|
|
|
|
|
:bind (("C-c l" . org-store-link) |
|
|
|
|
|
("C-c c" . org-capture) |
|
|
|
|
|
("C-c a" . org-agenda) |
|
|
|
|
|
:map org-mode-map ("S-<right>" . org-shiftright) |
|
|
("S-<left>" . org-shiftleft)) |
|
|
("S-<left>" . org-shiftleft)) |
|
|
:init |
|
|
:init |
|
|
|
|
|
(defun my--org-company () |
|
|
|
|
|
(set (make-local-variable 'company-backends) |
|
|
|
|
|
'(company-capf company-files)) |
|
|
|
|
|
(add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t)) |
|
|
|
|
|
|
|
|
(defun my--org-agenda-files-set () |
|
|
(defun my--org-agenda-files-set () |
|
|
"Sets default agenda files. |
|
|
"Sets default agenda files. |
|
|
Necessary when updating roam agenda todos." |
|
|
Necessary when updating roam agenda todos." |
|
@ -876,11 +884,6 @@ Necessary when updating roam agenda todos." |
|
|
(directory-files-recursively MY--PATH_ORG_FILES_MOBILE "\\.org$")))) |
|
|
(directory-files-recursively MY--PATH_ORG_FILES_MOBILE "\\.org$")))) |
|
|
(my--org-agenda-files-set) |
|
|
(my--org-agenda-files-set) |
|
|
:config |
|
|
:config |
|
|
(defun my--org-company () |
|
|
|
|
|
(set (make-local-variable 'company-backends) |
|
|
|
|
|
'(company-capf company-files)) |
|
|
|
|
|
(add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t) |
|
|
|
|
|
(message "company/org-mode-hook")) |
|
|
|
|
|
(setq org-modules (quote (org-id |
|
|
(setq org-modules (quote (org-id |
|
|
org-habit |
|
|
org-habit |
|
|
org-tempo ;; easy templates |
|
|
org-tempo ;; easy templates |
|
@ -888,43 +891,70 @@ Necessary when updating roam agenda todos." |
|
|
(setq org-default-notes-file (concat MY--PATH_ORG_FILES "notes.org")) |
|
|
(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") |
|
|
(setq org-id-locations-file (concat MY--PATH_USER_LOCAL ".org-id-locations") |
|
|
org-log-into-drawer "LOGBOOK") |
|
|
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) |
|
|
|
|
|
(org-startup-align-all-tables t) |
|
|
|
|
|
(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) |
|
|
|
|
|
) |
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
;; some display customizations |
|
|
|
|
|
(setq org-pretty-entities t |
|
|
|
|
|
org-startup-truncated t |
|
|
|
|
|
org-startup-align-all-tables t) |
|
|
|
|
|
|
|
|
** 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")))) |
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
;; some source code blocks customizations |
|
|
|
|
|
(setq org-src-window-setup 'current-window ;; C-c ' opens in current window |
|
|
|
|
|
org-src-fontify-natively t ;; use syntax highlighting in code blocks |
|
|
|
|
|
org-src-preserve-indentation t ;; no extra indentation |
|
|
|
|
|
org-src-tab-acts-natively t) |
|
|
|
|
|
|
|
|
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)))) |
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
(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 |
|
|
|
|
|
|
|
|
Customize the org agenda |
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
|
(defun my--org-skip-subtree-if-priority (priority) |
|
|
|
|
|
"Skip an agenda subtree if it has a priority of PRIORITY. |
|
|
|
|
|
|
|
|
|
|
|
PRIORITY may be one of the characters ?A, ?B, or ?C." |
|
|
|
|
|
(let ((subtree-end (save-excursion (org-end-of-subtree t))) |
|
|
|
|
|
(pri-value (* 1000 (- org-lowest-priority priority))) |
|
|
|
|
|
(pri-current (org-get-priority (thing-at-point 'line t)))) |
|
|
|
|
|
(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:"))))))) |
|
|
#+END_SRC |
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
** languages |
|
|
** languages |
|
|
Set some languages and disable confirmation for evaluating code blocks C-c C-c |
|
|
Set some languages and disable confirmation for evaluating code blocks C-c C-c |
|
|
|
|
|
|
|
|
+BEGIN_SRC emacs-lisp |
|
|
|
|
|
(org-babel-do-load-languages |
|
|
|
|
|
'org-babel-load-languages |
|
|
|
|
|
'((emacs-lisp . t) |
|
|
|
|
|
(gnuplot . t) |
|
|
|
|
|
(js . t) |
|
|
|
|
|
(latex . t) |
|
|
|
|
|
(lisp . t) |
|
|
|
|
|
(python . t) |
|
|
|
|
|
(shell . t) |
|
|
|
|
|
(sqlite . t) |
|
|
|
|
|
(org . t) |
|
|
|
|
|
(R . t) |
|
|
|
|
|
(scheme . t))) |
|
|
|
|
|
|
|
|
|
|
|
(setq org-confirm-babel-evaluate nil) |
|
|
|
|
|
+END_SRC |
|
|
|
|
|
Another setup, because org-babel-do-load-languages requires eager loading |
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
(use-package ob-org |
|
|
(use-package ob-org |
|
|
:defer t |
|
|
:defer t |
|
@ -1013,59 +1043,6 @@ Another setup, because org-babel-do-load-languages requires eager loading |
|
|
org-habit-show-habits-only-for-today nil) |
|
|
org-habit-show-habits-only-for-today nil) |
|
|
#+END_SRC |
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
** org-agenda |
|
|
|
|
|
Custom keywords, depending on environment |
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
|
(when *work_remote* |
|
|
|
|
|
(setq org-todo-keywords |
|
|
|
|
|
'((sequence "OPEN" "TODO" "UNCLEAR" "|" "DONE" "IMPOSSIBLE" "CANCELLED")))) |
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
Add some key bindings |
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
|
(bind-key "C-c l" 'org-store-link) |
|
|
|
|
|
(bind-key "C-c c" 'org-capture) |
|
|
|
|
|
(bind-key "C-c a" 'org-agenda) |
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
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)))) |
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
Customize the org agenda |
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
|
(defun my--org-skip-subtree-if-priority (priority) |
|
|
|
|
|
"Skip an agenda subtree if it has a priority of PRIORITY. |
|
|
|
|
|
|
|
|
|
|
|
PRIORITY may be one of the characters ?A, ?B, or ?C." |
|
|
|
|
|
(let ((subtree-end (save-excursion (org-end-of-subtree t))) |
|
|
|
|
|
(pri-value (* 1000 (- org-lowest-priority priority))) |
|
|
|
|
|
(pri-current (org-get-priority (thing-at-point 'line t)))) |
|
|
|
|
|
(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:"))))))) |
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
** *TODO* |
|
|
** *TODO* |
|
|
[[https://github.com/alphapapa/org-ql][org-ql]] |
|
|
[[https://github.com/alphapapa/org-ql][org-ql]] |
|
|
[[https://github.com/nobiot/org-transclusion][org-transclusion]]? |
|
|
[[https://github.com/nobiot/org-transclusion][org-transclusion]]? |
|
|