Skip to content

Latest commit

 

History

History
136 lines (130 loc) · 5.31 KB

org.org

File metadata and controls

136 lines (130 loc) · 5.31 KB

agenda

	(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

agenda.

tags

Default tags available in org files.

(setq org-tag-alist '(("dev" . d) ("personal" . ?p) ("research" . ?r) ("main" . ?m)))

tags.

capture

		(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" )
	))

Notes on org capture template.

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

org-roam - Cc n [lfgic]

docs and source.

Setup Company, set keys

	(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)

Set roam-capture templates

	(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
					)
					 ))

relies on Graphviz for graph visualisation. CMq, TAB, M; CcCc, Cx `, Cc Cp, Cc v

graphviz docs

(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")

images

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)

org-download.

keybinds

	(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)

settings

	(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
	)