(setq org-agenda-files '("~/org" ))
(setq org-agenda-custom-commands ; options - todo, tags, tags-todo
'(("d" "Dev" tags-todo "DEV")
("e" "Emacs" tags-todo "EMACS")
("p" "Personal" tags-todo "PERS")
("r" "Research" tags-todo "RSCH")
("m" "Research" tags-todo "MAIN")
))
(setq org-agenda-start-on-weekday nil) ; start today
Default tags available in org files.
(setq org-tag-alist '(("dev" . d) ("personal" . ?p) ("research" . ?r) ("main" . ?m)))
tags.
(setq org-default-notes-file (concat org-directory "~/org/tktodos.org")) ; capture
(setq org-capture-templates
'(
("z" "Misc todo" entry (file+headline "~/org/misc.org" "Misc")
"* TODO \t %? :MISC:\nAdded: %u:" :empty-lines 1 )
("d" "Dev" entry (file+headline "~/org/dev.org" "Dev")
"* TODO \t %? :DEV:\nAdded: %u" :empty-lines 1 )
("M" "Main Dev" entry (file+headline "~/org/main.org" "Main")
"* TODO [#A] \t %? :MAIN:DEV:\nAdded: %u" :empty-lines 1 )
("R" "Main Rsch" entry (file+headline "~/org/main.org" "Main")
"* TODO [#A] \t %? :MAIN:RSCH:\nAdded: %u" :empty-lines 1 )
("e" "Emacs" entry (file+headline "~/org/emacs.org" "Emacs")
"* TODO \t %? :EMACS:\nAdded: %u" :empty-lines 1 )
("p" "Personal" entry (file+headline "~/org/pers.org" "Pers")
"* TODO \t %? :PERS:\nAdded: %u" :empty-lines 1 )
("r" "Research" entry (file+headline "~/org/rsch.org" "Rsch")
"* TODO \t %? :RSCH:\nAdded: %u" :empty-lines 1 )
("i" "Idea" entry (file "~/org/ideas.org")
"* \t %? :IDEA:\nAdded: %u" )
))
See this for option elements, and this for template escape sequences. Usage: (key description type target template properties) types: entry (org node), item (plain list item at location), checkitem (checkbox item), table-line, plain templates: many targets: file “file”, id “existing id”, file+headline “file” “node”, datetree, clock properties: prepend, empty-lines, clock-in/keep/resume, time-prompt, tree-type, table-line-pos %? = point; %i = initial content %a = location stored from ; %l = literal %x,c = put pastebin, killring head %k title of currently clocked task; K = link to
%^g prompt for tags; G completion all tags all agenda files %^t prompt date, T,u,U %^{PROPMT|default|completion2|...} pick from a sequence of prompts
%t = datestamp; T= time+datestamp; u,U = inactive timestamps - don’t cause item to show up in agenda
(use-package org-roam
:hook
(after-init . org-roam-mode)
:custom ; adjust graph dot executable
(org-roam-directory "~/org/roam")
:bind (:map org-roam-mode-map (
("C-c n f" . org-roam-find-file)
("C-c n g" . org-roam-graph))
:map org-mode-map
(("C-c n i" . org-roam-insert))
(("C-c n c" . org-roam-capture))
(("C-c n I" . org-roam-insert-immediate))
))
(use-package company-org-roam)
(setq org-roam-completion-system 'ivy)
(setq org-roam-capture--file-name-default "<%Y-%m%-%d>")
(setq org-roam-capture-templates
;; '(("p" "paper" plain (function org-roam--capture-get-point)
;; "%?"
;; :file-name "paper/${topic}/${subtopic}/${slug}"
;; :head: "#+title: ${title}\n"
;; :unnarrowed t)
'(("w" "web" plain (function org-roam--capture-get-point)
"%?"
:file-name "web/${topic}/${subtopic}/${slug}"
:head "#+title: ${title}\n"
:unnarrowed t
)
))
(setq org-roam-graph-executable "/usr/local/bin/dot")
(use-package graphviz-dot-mode
:config
(setq graphviz-dot-indent-width 4))
;(setq org-roam-graph-viewer "/Applications/Safari.app/Contents/MacOS/safari")
Drag images into org or dired buffers. Saves in a folder in dir called images.
(use-package org-download)
(add-hook 'dired-mode-hook 'org-download-enable)
(global-set-key (kbd "C-c l") 'org-store-link) ; a link to dir in org file
(global-set-key (kbd "C-c a") 'org-agenda)
(global-set-key (kbd "C-c c") 'org-capture)
(add-hook 'org-mode-hook (lambda ()
(setq org-src-fontify-natively t) ; font-lock src if org recognizes the code block
(setq org-src-tab-acts-natively t)
(setq org-adapt-indentation nil) ; turn off special indentation in org subsections
(setq org-directory "~/org")
(setq org-log-done 'time) ; timstamp when TODO -> DONE
)