203 lines
7 KiB
EmacsLisp
203 lines
7 KiB
EmacsLisp
(use-package org
|
|
:ensure nil
|
|
:hook (org-mode . turn-on-auto-fill)
|
|
:init (org-clock-persistence-insinuate)
|
|
:bind
|
|
(("C-c l" . org-store-link)
|
|
("C-c a" . org-agenda)
|
|
("C-c c" . org-capture)
|
|
("C-c b" . org-switchb))
|
|
:init
|
|
(org-babel-lob-ingest "~/.emacs.d/library-of-babel.org")
|
|
:custom
|
|
(org-hide-emphasis-markers nil)
|
|
(org-default-notes-file "notes.org")
|
|
(org-insert-mode-line-in-empty-file t)
|
|
(org-adapt-indentation nil)
|
|
(org-agenda-prefix-format
|
|
'((agenda . " %i %-12:c%?-12t%-6e% s")
|
|
(todo . " %i %-12:c %-6e")
|
|
(tags . " %i %-12:c")
|
|
(search . " %i %-12:c")))
|
|
(org-agenda-dim-blocked-tasks nil)
|
|
(org-agenda-inhibit-startup nil)
|
|
(org-agenda-span 7)
|
|
(org-agenda-start-on-weekday 1)
|
|
(org-agenda-include-diary t)
|
|
(org-capture-templates
|
|
'(
|
|
;; Just make a note
|
|
("n" "Note" entry
|
|
(file+headline "notes.org" "Notes") "* %k\n%U\n- %l\n- %K\n%i\n%?")
|
|
|
|
;; Task driven life
|
|
("t" "Task" entry
|
|
(file+headline "planning.org" "Tasks") "* TODO %?\n%u")
|
|
|
|
;; Recurring appointments
|
|
("a" "Appointment" entry
|
|
(file+headline "planning.org" "Appointments") "* %?\n%T\n")
|
|
|
|
;; Capture a meeting
|
|
("m" "Meeting" entry
|
|
(file+headline "planning.org" "Meetings") "* %? :MEETING:\n%T" :clock-in t)
|
|
|
|
;; Capture a training
|
|
("w" "Training" entry
|
|
(file+headline "planning.org" "Trainings") "* %? :TRAINING:\n%T" :clock-in t)
|
|
|
|
;; Log my activities
|
|
("j" "Journal" entry
|
|
(file+olp+datetree "journal.org" "Journal") "* %^{Activity}\nEntered on %U\n%i\n%?" :tree-type week)
|
|
|
|
;; Log my activities
|
|
("l" "Log" entry
|
|
(file+olp+datetree "journal.org" "Logbook") "* %U - %^{Activity} :LOG:")
|
|
|
|
;; Log my growth talks
|
|
("g" "Growth Talk" entry
|
|
(file+olp+datetree "growthtalk.org" "Talks") "* %U - %^{Activity} :TALK:")
|
|
|
|
;; Record general hours
|
|
("A" "Allgemein" table-line (file+olp "journal.org" "Stunden" "Allgemein") "| %u | %^{Stunden} | %? |")
|
|
|
|
;; Record general hours
|
|
("B" "Buy" table-line (file+olp "journal.org" "Shopping") "| %u | %^{Preis} | %? |")))
|
|
(org-clock-out-remove-zero-time-clocks t)
|
|
(org-clock-persist t)
|
|
(org-clock-rounding-minutes 30)
|
|
(org-confirm-babel-evaluate nil)
|
|
(org-duration-format (quote h:mm))
|
|
(org-export-with-sub-superscripts nil)
|
|
(org-export-dispatch-use-expert-ui nil)
|
|
(org-export-backends
|
|
'(ascii html latex md))
|
|
(org-global-properties
|
|
'(("EFFORT_ALL" . "0:30 1:00 2:00 3:00 5:00 8:00")))
|
|
(org-html-doctype "html5")
|
|
(org-html-html5-fancy t)
|
|
(org-html-htmlize-output-type nil)
|
|
(org-latex-pdf-process
|
|
'("latexmk -xelatex -shell-escape -quiet -f %f"))
|
|
(org-latex-compiler "xelatex")
|
|
(org-latex-listings t)
|
|
(org-log-done (quote time))
|
|
(org-refile-targets '((nil :maxlevel . 3)))
|
|
(org-startup-folded t)
|
|
(org-startup-truncated nil)
|
|
(org-src-fontify-natively t)
|
|
(org-src-tab-acts-natively t)
|
|
(org-src-window-setup 'other-window)
|
|
(org-time-stamp-rounding-minutes '(30 30))
|
|
(org-todo-keywords
|
|
'((sequence "TODO" "DOING(!)" "DONE(!)")
|
|
(sequence "RECRUIT" "INTERVIEW" "QDA" "DOC" "REVIEW")))
|
|
(org-use-property-inheritance nil)
|
|
:config
|
|
(when (eq system-type 'windows-nt)
|
|
(setq org-babel-sqlite3-command "c:/msys64/mingw64/bin/sqlite3.exe"))
|
|
(org-babel-do-load-languages
|
|
'org-babel-load-languages
|
|
'((emacs-lisp . t) (lisp . t) (gnuplot . t) (python . t) (sqlite . t) (shell . t) (plantuml . t)))
|
|
;; work with org-agenda dispatcher [c] "Today Clocked Tasks" to view today's clocked tasks.
|
|
(defun org-agenda-log-mode-colorize-block ()
|
|
"Set different line spacing based on clock time duration."
|
|
(save-excursion
|
|
(let* ((colors (cl-case (alist-get 'background-mode (frame-parameters))
|
|
('light (list "#d8dee9" "#e5e9f0" "#eceff4"))
|
|
('dark (list "#bf616a" "#d08770" "#ebcb8b" "#a3be8c" "#b48ead"))))
|
|
pos
|
|
duration)
|
|
(nconc colors colors)
|
|
(goto-char (point-min))
|
|
(while (setq pos (next-single-property-change (point) 'duration))
|
|
(goto-char pos)
|
|
(when (and (not (equal pos (point-at-eol)))
|
|
(setq duration (org-get-at-bol 'duration)))
|
|
;; larger duration bar height
|
|
(let ((line-height (if (< duration 15) 1.0 (+ 0.5 (/ duration 30))))
|
|
(ov (make-overlay (point-at-bol) (1+ (point-at-eol)))))
|
|
(overlay-put ov 'face `(:background ,(car colors) :foreground "black"))
|
|
(setq colors (cdr colors))
|
|
(overlay-put ov 'line-height line-height)
|
|
(overlay-put ov 'line-spacing (1- line-height))))))))
|
|
(add-hook 'org-agenda-finalize-hook #'org-agenda-log-mode-colorize-block))
|
|
|
|
(use-package org-roam
|
|
:after org
|
|
:init
|
|
(setq org-roam-v2-ack t)
|
|
(setq org-roam-db-location "~/org-roam.db")
|
|
(require 'org-roam-dailies)
|
|
:bind (("C-c r l" . org-roam-buffer-toggle)
|
|
("C-c r f" . org-roam-node-find)
|
|
("C-c r g" . org-roam-graph)
|
|
("C-c r i" . org-roam-node-insert)
|
|
("C-c r c" . org-roam-capture)
|
|
("C-c r j" . org-roam-dailies-map)
|
|
:map org-roam-dailies-map
|
|
("t" . org-roam-dailies-capture-today)
|
|
("y" . org-roam-dailies-capture-yesterday)
|
|
("T" . org-roam-dailies-capture-tomorrow)
|
|
:map org-mode-map
|
|
("C-M-i" . completion-at-point))
|
|
:custom
|
|
(org-roam-completion-everywhere t)
|
|
(org-roam-dailies-capture-templates
|
|
'(("d" "default" entry "* %<%R> %?"
|
|
:if-new (file+head "%<%F>.org" "#+title: %<%F>\n"))))
|
|
(org-roam-capture-templates
|
|
'(("d" "default" plain
|
|
"%?"
|
|
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+date: %U\n")
|
|
:unnarrowed t)
|
|
|
|
("n" "Note" plain
|
|
"%?"
|
|
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+date: %U\n%l\n\n%i")
|
|
:unnarrowed t)
|
|
|
|
("p" "personas" plain
|
|
"%?"
|
|
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+date: %U\n* Personality\n* Behaviors\n* Needs & Goals\n")
|
|
:unnarrowed t))))
|
|
|
|
(use-package org-tree-slide
|
|
:bind ("<f5>" . org-tree-slide-mode)
|
|
:custom
|
|
(org-image-actual-width nil))
|
|
|
|
(use-package org-web-tools
|
|
:defer t
|
|
:custom (org-web-tools-pandoc-sleep-time 0.4))
|
|
|
|
;; (use-package ob-go
|
|
;; :after org)
|
|
|
|
(use-package ox-reveal
|
|
:after org)
|
|
|
|
;; (defun me/write-readme-md-on-save ()
|
|
;; ;; when README.org, also write README.md on save
|
|
;; (when (string-match "README" (buffer-file-name))
|
|
;; (make-local-variable 'after-save-hook)
|
|
;; (add-hook 'after-save-hook
|
|
;; (lambda () (let ((outfile (org-export-output-file-name ".md")))
|
|
;; (org-export-to-file 'md outfile))))))
|
|
;; (add-hook 'org-mode-hook 'me/write-readme-md-on-save)
|
|
|
|
(use-package ob-go
|
|
:after org
|
|
:config
|
|
(append '((go . t)) org-babel-load-languages))
|
|
|
|
(use-package ob-http
|
|
:after org
|
|
:config
|
|
(append '((http . t)) org-babel-load-languages))
|
|
|
|
;; (use-package ob-racket
|
|
;; :after org
|
|
;; :pin manual
|
|
;; :config
|
|
;; (append '((racket . t) (scribble . t)) org-babel-load-languages))
|