do not edit — generated by btf.
git.druid.rocksindexdruid520radiumradium-org.el

radium-org.el


;;; radium-org.el, org-mode: agenda, capture, refile, babel -*- lexical-binding: t; -*-
;;
;; notes/tasks live under ~/org (org-directory), created if it isnt
;; there yet: todo.org (tasks), notes.org (everything else), journal.org
;; (dated entries via a datetree). C-c n is the whole prefix (C-c a/C-c
;; c are already radium prefixes - C-c a w, C-c c c/s/S - so org doesnt
;; get the textbook global bindings from its own manual).
;;
;;   C-c n a   org-agenda
;;   C-c n c   org-capture
;;   C-c n l   org-store-link
;;   C-c n r   org-refile
;;
;; deliberately NOT using org-modern/org-superstar/org-bullets - they
;; replace headline stars and tags with unicode glyphs by default, and
;; this whole framework stays plain-ascii on a tty. stars stay stars.
;;
;; babel block evaluation still asks for confirmation every time
;; (org-confirm-babel-evaluate's own default, left alone) - same "ask
;; before running embedded code" shape as the ![shell:...] macro and
;; gptel's write/edit/shell tools elsewhere in this framework.
 
(defvar radium-org-directory (expand-file-name "~/org/"))
 
(unless (file-directory-p radium-org-directory)
  (make-directory radium-org-directory t))
 
(use-package org
  :ensure nil ;; use whatever this emacs ships - see the commit for why
  ;; :bind alone would defer :config (and org-directory/capture-
  ;; templates/babel-languages with it) until one of those keys is
  ;; pressed - the exact same trap radium-gptel.el hit before. :demand
  ;; forces it to configure at startup like every other module here.
  :demand t
  :config
  (setq org-directory radium-org-directory
        org-default-notes-file (expand-file-name "notes.org" radium-org-directory)
        org-agenda-files (list radium-org-directory)
        org-startup-indented t
        org-src-tab-acts-natively t
        org-todo-keywords
        '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)" "CANCELED(c)"))
        org-refile-targets '((org-agenda-files :maxlevel . 3))
        org-refile-use-outline-path 'file
        org-outline-path-complete-in-steps nil)
 
  (setq org-capture-templates
        `(("t" "todo" entry
           (file+headline ,(expand-file-name "todo.org" radium-org-directory) "inbox")
           "* TODO %?\n%U\n" :empty-lines 1)
          ("n" "note" entry
           (file+headline ,(expand-file-name "notes.org" radium-org-directory) "inbox")
           "* %?\n%U\n" :empty-lines 1)
          ("j" "journal" entry
           (file+olp+datetree ,(expand-file-name "journal.org" radium-org-directory))
           "* %U %?\n" :empty-lines 1)))
 
  (org-babel-do-load-languages
   'org-babel-load-languages
   '((shell . t)
     (emacs-lisp . t)
     (scheme . t)
     (perl . t)
     (C . t)))
 
  ;; ob-perl's own default :results is "value" (the last expression's
  ;; return value, e.g. print's own `1'), not the printed output - so a
  ;; plain print in a block silently showed "1" instead of what it
  ;; printed. "output" matches what i actually want by default.
  (setq org-babel-default-header-args:perl '((:results . "output")))
 
  :bind (("C-c n a" . org-agenda)
         ("C-c n c" . org-capture)
         ("C-c n l" . org-store-link)
         ("C-c n r" . org-refile)))
 
;; item 2: org-roam, under org's own ~/org tree (a roam/ subdirectory,
;; not a second, separate notes root) - :demand for the exact same
;; reason radium-org's own use-package block above is (:bind alone
;; would defer org-roam-directory/org-roam-db-autosync-mode along with
;; everything else, until C-c n f/i/b is actually pressed - the same
;; trap radium-gptel.el and this file's own header already document).
;; f/i/b (find/insert/bumffer) round out C-c n's own a/c/l/r without
;; colliding with any of them.
(use-package org-roam
  :after org
  :demand t
  :init
  (setq org-roam-directory (expand-file-name "roam" radium-org-directory)
        org-roam-v2-ack t)
  :config
  (unless (file-directory-p org-roam-directory)
    (make-directory org-roam-directory t))
  (org-roam-db-autosync-mode 1)
  :bind (("C-c n f" . org-roam-node-find)
         ("C-c n i" . org-roam-node-insert)
         ("C-c n b" . org-roam-buffer-toggle)))
 
(provide 'radium-org)
powered by btf.