Files
emacs/config/org_mode.org
2025-10-30 14:35:56 -05:00

3.0 KiB

Org Mode

Org mode is a handy note taking, todo list managing, journal writing, and literate programming tool among other things. I use it for writing some of my configurations, and managing my notes.

(use-feature org
  :defer t
  :config
  (setq org-confirm-babel-evaluate nil)
  :custom
  (org-ellipsis (nth 5 '("↴" "˅" "…" " ⬙" " ▽" "▿")))
  (org-priority-lowest ?D)
  (org-fontify-done-headline t)
  (global-set-key (kbd "C-c l") #'org-store-link)
  (global-set-key (kbd "C-c a") #'org-agenda)
  (global-set-key (kbd "C-c c") #'org-capture))

Htmlize

The htmlize package enables exporting org documents, and other buffers into HTML format.

(use-package htmlize
  :after (org)
  :defer t)

Org Modern

org-modern provides a cleaner representation of org documents while being edited. It displays the intended formatting without all the markup.

(use-package org-modern
  :after (org)
  :config
  (global-org-modern-mode)
  (remove-hook 'org-agenda-finalize-hook 'org-modern-agenda))

Literate Tools

These are packages useful for literate programming, and its presentation. Though not necessarily exlusive to literate programming as they can improve the look of most any org document.

(use-feature ob-tangle
  :after (org)
  :custom
  (org-src-window-setup 'current-window)
  (org-src-preserve-indentation t))

;; Maybe unnecessary... I'll see.
(use-package org-contrib)

(use-package org-make-toc
  :commands (org-make-toc))

Note Taking

Org-roam is my go to for note taking. While out of the box it isn't quite as snazzy as something like Obsidian it does offer a lot of flexibility that no other note taking tool has.

(use-package org-roam
  :after (org)
  :ensure t
  :bind (("C-c n l" . org-roam-buffer-toggle)
         ("C-c n f" . org-roam-node-find)
         ("C-c n i" . org-roam-node-insert))
  :config
  (setq org-roam-directory "~/Documents/org-roam"
        org-roam-dailies-directory "daily/")

  (setq org-roam-capture-templates
        '(("d" "default plain" plain
           "%?"
           :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
                              "#+title: ${title}\n"))
          ("D" "default encrypted" plain
           "%?"
           :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org.gpg"
                              "#+title: ${title}\n"))))

  (setq org-roam-dailies-capture-templates
        '(("d" "default" plain
           "%?"
           :target (file+head "%<%Y-%m-%d>.org"
                              "#+title: %<%Y-%m-%d>\n\n* Tasks\n\n* Notes"))))

  (org-roam-db-autosync-mode))

(use-package orgmdb
  :ensure t)

(use-package org-roam-ui
  :after (org-roam)
  :ensure t
  :config
  (setq org-roam-ui-sync-theme t
        org-roam-ui-follow t
        org-roam-ui-update-on-save t
        org-roam-ui-open-on-start t))