2024-02-15 08:18:41 +00:00
|
|
|
#+title: Org-mode Config
|
|
|
|
#+author: Evie Litherland-Smith
|
|
|
|
#+email: evie@xenia.me.uk
|
|
|
|
#+filetags: :emacs:config:org:
|
2024-02-15 08:45:37 +00:00
|
|
|
#+property: header-args:emacs-lisp :tangle yes :mkdirp yes :results output silent
|
2024-02-15 12:01:36 +00:00
|
|
|
|
2024-02-15 08:18:41 +00:00
|
|
|
For reference information, see [[https://orgmode.com][Org-mode website]]
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp :results output silent
|
|
|
|
(setq org-directory "~/Documents/Org"
|
|
|
|
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
2024-03-11 14:54:26 +00:00
|
|
|
org-attach-id-dir (expand-file-name "data/" org-directory)
|
2024-02-15 08:18:41 +00:00
|
|
|
org-hide-emphasis-markers nil
|
|
|
|
org-pretty-entities-include-sub-superscripts t
|
2024-03-03 08:31:24 +00:00
|
|
|
org-fontify-done-headline t
|
|
|
|
org-fontify-todo-headline t
|
|
|
|
org-fontify-emphasized-text t
|
|
|
|
org-fontify-quote-and-verse-blocks t
|
2024-03-11 07:27:23 +00:00
|
|
|
org-src-window-setup 'current-window
|
2024-02-15 08:18:41 +00:00
|
|
|
org-tags-column 0
|
|
|
|
org-outline-path-complete-in-steps nil
|
|
|
|
org-return-follows-link t
|
|
|
|
org-mouse-1-follows-link t
|
|
|
|
org-link-descriptive t
|
2024-02-27 17:29:46 +00:00
|
|
|
org-enforce-todo-dependencies t
|
|
|
|
org-enforce-todo-checkbox-dependencies t
|
2024-02-15 08:18:41 +00:00
|
|
|
org-refile-use-outline-path t
|
|
|
|
org-refile-allow-creating-parent-nodes t
|
|
|
|
org-refile-use-outline-path 'file
|
2024-03-11 08:23:43 +00:00
|
|
|
org-refile-targets '((nil . (:maxlevel . 2))
|
|
|
|
(org-agenda-files . (:maxlevel . 2))))
|
|
|
|
|
2024-02-15 08:18:41 +00:00
|
|
|
;; Visually indent org-mode files to a given header level
|
|
|
|
(add-hook 'org-mode-hook #'org-indent-mode)
|
|
|
|
|
|
|
|
(use-package org
|
|
|
|
:ensure t
|
|
|
|
:custom
|
|
|
|
(org-babel-load-languages '((emacs-lisp . t)
|
2024-03-18 21:10:07 +00:00
|
|
|
(lua . t)
|
2024-03-03 08:31:24 +00:00
|
|
|
(python . t)))
|
|
|
|
:config
|
|
|
|
(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
|
|
|
|
(set-face-attribute 'org-block nil :inherit 'fixed-pitch)
|
|
|
|
(set-face-attribute 'org-quote nil :inherit 'variable-pitch)
|
|
|
|
(set-face-attribute 'org-verse nil :inherit 'variable-pitch))
|
2024-02-15 08:18:41 +00:00
|
|
|
#+end_src
|
|
|
|
|
2024-02-15 12:01:36 +00:00
|
|
|
* Keymaps
|
2024-02-15 08:18:41 +00:00
|
|
|
#+begin_src emacs-lisp :results output silent
|
|
|
|
(keymap-global-set "C-c o ." #'calendar)
|
|
|
|
(keymap-global-set "C-c o e" #'org-edit-src-code)
|
|
|
|
(keymap-global-set "C-c o a" #'org-agenda)
|
|
|
|
(keymap-global-set "C-c o n" #'org-capture)
|
|
|
|
(keymap-global-set "C-c o l" #'org-capture-goto-last-stored)
|
|
|
|
#+end_src
|
|
|
|
|
2024-02-15 12:01:36 +00:00
|
|
|
* Capture templates
|
|
|
|
#+begin_src emacs-lisp :results output silent
|
|
|
|
(setq org-capture-templates
|
|
|
|
'(("n" "Note" entry
|
2024-03-17 12:02:41 +00:00
|
|
|
(file+olp+datetree "notes.org" "Inbox")
|
2024-03-11 11:33:10 +00:00
|
|
|
"* %?")
|
2024-02-15 12:01:36 +00:00
|
|
|
("t" "Task" entry
|
2024-03-17 12:02:41 +00:00
|
|
|
(file+olp+datetree "tasks.org" "Inbox")
|
2024-03-11 11:33:10 +00:00
|
|
|
"* TODO %?")
|
2024-02-15 12:01:36 +00:00
|
|
|
("r" "Reading List" entry
|
2024-03-17 12:02:41 +00:00
|
|
|
(file+olp+datetree "reading.org" "Inbox")
|
2024-02-15 12:01:36 +00:00
|
|
|
"* %?")
|
|
|
|
("m" "Email Workflow")
|
2024-03-01 10:54:07 +00:00
|
|
|
("mf" "Follow Up" entry
|
2024-03-17 12:02:41 +00:00
|
|
|
(file+olp+datetree "tasks.org" "Inbox")
|
|
|
|
"* TODO Follow up with %:fromname on %a :email:\nDEADLINE: %^{deadline}t\n\n%i")
|
2024-03-01 10:54:07 +00:00
|
|
|
("mr" "Read Later" entry
|
2024-03-17 12:02:41 +00:00
|
|
|
(file+olp+datetree "reading.org" "Inbox")
|
|
|
|
"* TODO Read %:subject :email:\nSCHEDULED: %^{scheduled}t\n\n%i")
|
2024-02-15 12:01:36 +00:00
|
|
|
))
|
|
|
|
#+end_src
|
2024-02-18 07:17:42 +00:00
|
|
|
|
2024-02-15 12:01:36 +00:00
|
|
|
* org-roam
|
2024-02-15 08:18:41 +00:00
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package org-roam
|
|
|
|
:ensure t
|
|
|
|
:after org
|
|
|
|
:diminish
|
|
|
|
:bind (("C-c o r i" . org-roam-node-insert)
|
|
|
|
("C-c o r f" . org-roam-node-find)
|
|
|
|
("C-c o r n" . org-roam-capture))
|
|
|
|
:custom
|
|
|
|
(org-roam-directory (expand-file-name "roam" org-directory))
|
2024-02-19 09:34:18 +00:00
|
|
|
(org-roam-completion-everywhere t)
|
2024-02-15 08:18:41 +00:00
|
|
|
(org-roam-node-display-template (concat "${title:*} "
|
2024-02-15 13:22:15 +00:00
|
|
|
(propertize "${tags:24}" 'face 'org-tag)))
|
2024-02-15 08:18:41 +00:00
|
|
|
:config
|
|
|
|
(mkdir org-roam-directory t)
|
|
|
|
(add-to-list 'display-buffer-alist
|
|
|
|
'("\\*org-roam\\*"
|
|
|
|
(display-buffer-in-side-window)
|
|
|
|
(side . right)
|
|
|
|
(slot . 0)
|
|
|
|
(window-width . 0.33)
|
|
|
|
(window-parameters . ((no-other-window . t)
|
|
|
|
(no-delete-other-windows . t)))))
|
|
|
|
(org-roam-db-autosync-mode +1))
|
|
|
|
#+end_src
|
2024-02-15 12:20:54 +00:00
|
|
|
** Capture templates
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(with-eval-after-load 'org-roam
|
|
|
|
(setq org-roam-capture-templates
|
|
|
|
'(("d" "default" plain "%?"
|
2024-02-15 13:18:41 +00:00
|
|
|
:target (file+head "${slug}.org"
|
2024-02-15 13:13:59 +00:00
|
|
|
"#+title: ${title}\n#+author: %n")
|
2024-02-15 12:20:54 +00:00
|
|
|
:unnarrowed t))))
|
|
|
|
#+end_src
|
2024-02-19 09:34:18 +00:00
|
|
|
|
|
|
|
** Graph
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(with-eval-after-load 'org-roam
|
|
|
|
(setq org-roam-graph-executable "dot"
|
|
|
|
org-roam-graph-filetype "svg"))
|
|
|
|
#+end_src
|
2024-02-15 12:01:36 +00:00
|
|
|
* org-agenda
|
2024-02-15 08:18:41 +00:00
|
|
|
#+begin_src emacs-lisp :results output silent
|
2024-03-04 13:59:22 +00:00
|
|
|
(setq org-agenda-span 'day
|
2024-02-15 08:18:41 +00:00
|
|
|
org-agenda-start-on-weekday 1
|
|
|
|
org-agenda-sticky nil
|
|
|
|
org-agenda-window-setup 'current-window
|
|
|
|
org-agenda-tags-column 0
|
2024-03-17 10:40:56 +00:00
|
|
|
org-agenda-diary-file (expand-file-name "diary.org" org-directory)
|
2024-03-11 14:35:02 +00:00
|
|
|
org-agenda-include-diary nil
|
2024-03-05 07:06:30 +00:00
|
|
|
org-agenda-include-deadlines t
|
2024-02-15 08:18:41 +00:00
|
|
|
org-agenda-todo-ignore-scheduled 'future
|
|
|
|
org-agenda-todo-ignore-deadlines 'far
|
|
|
|
org-agenda-prefix-format '((agenda . " %-12:c%?-12t% s")
|
|
|
|
(todo . " %-12:c")
|
|
|
|
(tags . " %-12:c")
|
2024-02-15 12:12:53 +00:00
|
|
|
(search . " %-12:c"))
|
2024-03-11 08:23:43 +00:00
|
|
|
org-agenda-files (list
|
|
|
|
(expand-file-name org-directory)
|
|
|
|
(expand-file-name "journal" org-directory)
|
|
|
|
(expand-file-name "noter" org-directory)
|
|
|
|
(expand-file-name "projects" org-directory)))
|
2024-02-15 08:18:41 +00:00
|
|
|
#+end_src
|
2024-03-17 10:54:46 +00:00
|
|
|
|
|
|
|
** Mobile agenda integration
|
|
|
|
Better syncing to mobile, for use with [[https://github.com/orgzly-revived/orgzly-android-revived][Orgzly]].
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(with-eval-after-load 'org
|
|
|
|
(setq org-mobile-directory "~/.orgmobile/"
|
2024-03-17 12:02:41 +00:00
|
|
|
org-mobile-capture-file "inbox.org"
|
2024-03-17 10:54:46 +00:00
|
|
|
org-mobile-agendas nil
|
2024-03-17 11:52:01 +00:00
|
|
|
org-mobile-files (list (expand-file-name "diary.org" org-directory)
|
2024-03-17 12:02:41 +00:00
|
|
|
(expand-file-name "notes.org" org-directory)
|
|
|
|
(expand-file-name "tasks.org" org-directory)
|
|
|
|
(expand-file-name "reading.org" org-directory))
|
2024-03-17 10:54:46 +00:00
|
|
|
org-mobile-inbox-for-pull (expand-file-name "inbox.org" org-directory)
|
|
|
|
org-mobile-force-id-on-agenda-items nil)
|
|
|
|
(add-hook 'org-capture-finalize-hook #'org-mobile-push))
|
|
|
|
#+end_src
|
2024-02-15 12:01:36 +00:00
|
|
|
* org-journal
|
2024-02-15 08:18:41 +00:00
|
|
|
#+begin_src emacs-lisp :results output silent
|
|
|
|
(use-package org-journal
|
|
|
|
:bind (("C-c o j" . org-journal-new-entry))
|
|
|
|
:custom
|
|
|
|
(org-journal-dir (expand-file-name "journal" org-directory))
|
|
|
|
(org-journal-file-type 'monthly)
|
|
|
|
(org-journal-file-format "%Y-%m.org"))
|
|
|
|
#+end_src
|
2024-02-15 12:01:36 +00:00
|
|
|
* org-noter
|
2024-02-15 08:18:41 +00:00
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package org-noter
|
|
|
|
:ensure t
|
|
|
|
:diminish
|
|
|
|
:after (org doc-view)
|
|
|
|
:commands (org-noter)
|
|
|
|
:custom
|
|
|
|
(org-noter-always-create-frame nil)
|
|
|
|
(org-noter-kill-frame-at-session-end nil)
|
|
|
|
(org-noter-auto-save-last-location t)
|
|
|
|
(org-noter-default-notes-file-names '("notes.org"))
|
|
|
|
(org-noter-doc-property-in-notes t)
|
|
|
|
(org-noter-notes-search-path (list
|
|
|
|
(expand-file-name org-directory)
|
|
|
|
(expand-file-name "~/Documents/References/library/")))
|
|
|
|
(org-noter-prefer-root-as-file-level nil))
|
|
|
|
#+end_src
|
|
|
|
|
2024-02-15 12:01:36 +00:00
|
|
|
* citar
|
2024-02-15 08:18:41 +00:00
|
|
|
#+begin_src emacs-lisp :results output silent
|
|
|
|
(use-package citar
|
|
|
|
:ensure t
|
|
|
|
:diminish
|
|
|
|
:custom
|
|
|
|
(org-cite-global-bibliography '("~/Documents/References/main.bib"))
|
|
|
|
(org-cite-insert-processor 'citar)
|
|
|
|
(org-cite-follow-processor 'citar)
|
|
|
|
(org-cite-activate-processor 'citar)
|
|
|
|
(citar-bibliography org-cite-global-bibliography)
|
|
|
|
(citar-library-paths '("~/Documents/References/library/"))
|
|
|
|
(citar-notes-paths '("~/Documents/References/notes/"))
|
|
|
|
:hook
|
|
|
|
(LaTeX-mode . citar-capf-setup)
|
|
|
|
(org-mode . citar-capf-setup)
|
2024-03-11 22:13:29 +00:00
|
|
|
:bind (("C-c o c" . citar-open))
|
2024-02-15 08:18:41 +00:00
|
|
|
:config
|
2024-02-26 15:10:06 +00:00
|
|
|
(require 'nerd-icons)
|
2024-02-15 13:38:16 +00:00
|
|
|
(require 'citar-embark)
|
2024-02-15 08:18:41 +00:00
|
|
|
(defvar citar-indicator-files-icons
|
|
|
|
(citar-indicator-create
|
|
|
|
:symbol (nerd-icons-octicon
|
|
|
|
"nf-oct-file"
|
|
|
|
:face 'nerd-icons-green
|
|
|
|
:v-adjust -0.1)
|
|
|
|
:function #'citar-has-files
|
|
|
|
:padding " " ; need this because the default padding is too low for these icons
|
|
|
|
:tag "has:files"))
|
|
|
|
(defvar citar-indicator-links-icons
|
|
|
|
(citar-indicator-create
|
|
|
|
:symbol (nerd-icons-octicon
|
|
|
|
"nf-oct-link"
|
|
|
|
:face 'nerd-icons-orange
|
|
|
|
:v-adjust 0.01)
|
|
|
|
:function #'citar-has-links
|
|
|
|
:padding " " ; need this because the default padding is too low for these icons
|
|
|
|
:tag "has:links"))
|
|
|
|
(defvar citar-indicator-notes-icons
|
|
|
|
(citar-indicator-create
|
|
|
|
:symbol (nerd-icons-octicon
|
|
|
|
"nf-oct-note"
|
|
|
|
:face 'nerd-icons-blue
|
|
|
|
:v-adjust -0.3)
|
|
|
|
:function #'citar-has-notes
|
|
|
|
:padding " " ; need this because the default padding is too low for these icons
|
|
|
|
:tag "has:notes"))
|
|
|
|
(defvar citar-indicator-cited-icons
|
|
|
|
(citar-indicator-create
|
|
|
|
:symbol (nerd-icons-octicon
|
|
|
|
"nf-oct-circle"
|
|
|
|
:face 'nerd-icon-green)
|
|
|
|
:function #'citar-is-cited
|
|
|
|
:padding " " ; need this because the default padding is too low for these icons
|
|
|
|
:tag "is:cited"))
|
|
|
|
(setq citar-indicators (list citar-indicator-files-icons
|
|
|
|
citar-indicator-links-icons
|
|
|
|
citar-indicator-notes-icons
|
|
|
|
citar-indicator-cited-icons)))
|
|
|
|
#+end_src
|
|
|
|
|
2024-02-15 12:01:36 +00:00
|
|
|
** Citar Embark integration
|
2024-02-15 08:18:41 +00:00
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package citar-embark
|
|
|
|
:ensure t
|
|
|
|
:diminish
|
|
|
|
:after (citar embark)
|
2024-02-15 13:38:16 +00:00
|
|
|
:init
|
2024-02-15 08:18:41 +00:00
|
|
|
(citar-embark-mode +1))
|
|
|
|
#+end_src
|
|
|
|
|
2024-02-15 13:38:16 +00:00
|
|
|
* LaTeX
|
2024-02-15 08:18:41 +00:00
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq org-latex-compiler "lualatex")
|
|
|
|
(setq org-preview-latex-default-process 'dvisvgm)
|
|
|
|
#+end_src
|
2024-02-22 08:48:09 +00:00
|
|
|
|
|
|
|
* Publishing config
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq org-publish-project-alist
|
|
|
|
'(("landing"
|
|
|
|
:base-directory "~/Documents/Web/landing/"
|
|
|
|
:base-extension "org"
|
|
|
|
:exclude "README.org"
|
|
|
|
:recursive t
|
|
|
|
:publishing-function org-html-publish-to-html
|
|
|
|
:publishing-directory "/sshx:xenia@legion:/var/www/landing"
|
|
|
|
:section-numbers nil
|
|
|
|
:with-author t
|
|
|
|
:with-email t
|
|
|
|
:with-toc nil
|
|
|
|
;; :html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/readtheorg.css\"/>"
|
|
|
|
)
|
|
|
|
("blog"
|
|
|
|
:base-directory "~/Documents/Web/blog/"
|
|
|
|
:base-extension "org"
|
|
|
|
:exclude "README.org"
|
|
|
|
:recursive t
|
|
|
|
:publishing-function org-html-publish-to-html
|
|
|
|
:publishing-directory "/sshx:xenia@legion:/var/www/blog"
|
|
|
|
:section-numbers nil
|
|
|
|
:with-author t
|
|
|
|
:with-email t
|
|
|
|
:with-toc t
|
|
|
|
:html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/readtheorg.css\"/>"
|
|
|
|
)))
|
|
|
|
#+end_src
|