Compare commits

...

6 Commits

Author SHA1 Message Date
71bb316433 Fix Cross References 2025-09-04 15:42:37 -04:00
72ec0bbcca Fix indents 2025-09-03 17:04:23 -04:00
51149a1c62 TODO: Fix overrides for local-repo/emacs (for nix derivation) 2025-09-03 17:00:24 -04:00
2adc03c10d Cleanup Straight/Org Literate Loading 2025-09-02 11:56:17 -04:00
abd4dbb085 Merge branch 'master' of https://git.syzygial.cc/Syzygial/EmacsConfig 2025-09-02 11:16:25 -04:00
5a840488b5 Todo.org -> todos.org 2025-03-24 10:29:56 -04:00
2 changed files with 32 additions and 47 deletions

23
init.el
View File

@@ -3,6 +3,8 @@
;; This file loads Org and then loads the rest of our Emacs initialization from Emacs lisp
;; embedded in literate Org files.
(setq straight-check-for-modifications '(check-on-save find-when-checking))
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name
@@ -19,24 +21,13 @@
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(setq straight-vc-git-default-clone-depth '(1 single-branch)) ;; instead of the default 'full
;; prebuild is broken in org-mode (TODO: FIX)
;; (straight-override-recipe '(org :local-repo "/Users/universelaptop/tmp/org"))
(straight-use-package 'org)
;; Load up Org Mode and (now included) Org Babel for elisp embedded in Org Mode files
(setq dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name)))
(let* ((org-dir (expand-file-name
"lisp" (expand-file-name
"org" (expand-file-name
"src" dotfiles-dir))))
(org-contrib-dir (expand-file-name
"lisp" (expand-file-name
"contrib" (expand-file-name
".." org-dir))))
(load-path (append (list org-dir org-contrib-dir)
(or load-path nil))))
;; load up Org and Org-babel
(require 'org)
(require 'ob-tangle))
(setq dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name)))
;; load up all literate org-mode files in this directory
(mapc #'org-babel-load-file (directory-files dotfiles-dir t "\\.org$"))

View File

@@ -12,7 +12,8 @@
** Straight.el
Package management to be a little more fien/precise and work outside
of Nix (as much as it would be nice to work inside of Nix too)
of Nix (as much as it would be nice to work inside of Nix too). This
is actually contained within =init.el=
#+begin_src elisp :tangle no :exports code
(defvar bootstrap-version)
@@ -448,8 +449,8 @@ conflict with the builtin version of Org)
(when (not (file-exists-p org-directory)) (mkdir org-directory))
(set-fill-column 100)
(setq org-src-fontify-natively t
org-confirm-babel-evaluate nil
org-src-preserve-indentation t))
org-confirm-babel-evaluate nil
org-src-preserve-indentation t))
;; (tempo-define-template "Fig. Caption"
;; '("" (P "Image: " image t)
;; (P "Caption: " caption t)
@@ -504,8 +505,9 @@ updating our bibliography.
bibtex-autokey-titlewords 2
bibtex-autokey-titlewords-stretch 1
bibtex-autokey-titleword-length 5)
(add-hook 'org-export-before-parsing-functions 'org-ref-csl-preprocess-buffer)
:require org-ref org-ref-helm oc-bibtex oc-bibtex oc-csl oc-natbib)
(add-to-list 'org-export-before-parsing-functions 'org-ref-csl-preprocess-buffer)
(add-to-list 'org-export-before-parsing-functions 'org-ref-refproc)
:require org-ref org-ref-helm oc-bibtex oc-bibtex oc-csl oc-natbib org-ref-refproc)
#+end_src
** Extra Export Options
@@ -520,28 +522,21 @@ We really do require latex
:config
(add-to-list 'org-latex-packages-alist '("" "minted"))
(setq org-latex-listings 'minted)
(setq org-latex-prefer-user-labels t)
(add-to-list 'org-latex-classes
'("labtemplate" "\\documentclass{labtemplate}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
'("labtemplate" "\\documentclass{labtemplate}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
(add-to-list 'org-latex-classes
'("thesis" "\\documentclass[11pt]{ut-thesis}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
(setq org-latex-pdf-process
'("%latex -shell-escape -interaction nonstopmode -output-directory %o %f"
"%latex -shell-escape -interaction nonstopmode -output-directory %o %f"
"bibtex %b"
"%latex -shell-escape -interaction nonstopmode -output-directory %o %f"
"%latex -shell-escape -interaction nonstopmode -output-directory %o %f")))
'("thesis" "\\documentclass[11pt]{ut-thesis}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
#+end_src
*** HTML Export
@@ -611,9 +606,9 @@ And in case we want to make some (GNU)?plots?
*** Agenda Location
# Make it so that all files in the " src_elisp{org-agenda-files} " variable (e.g. "=~/Documents=") will be
# included in the tablutation and collation of all the dates and todos
# etc.
Make it so that all files in the " src_elisp{org-agenda-files} " variable (e.g. "=~/Documents=") will be
included in the tablutation and collation of all the dates and todos
etc.
#+begin_src elisp :tangle yes :exports code
(leaf org-agenda
@@ -648,9 +643,9 @@ e.g. meetings, deadlines and whatever else:
:config
(add-hook 'org-capture-mode-hook #'org-id-get-create)
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "todo.org" "Tasks")
'(("t" "Todo" entry (file+headline "todos.org" "Tasks")
"* TODO %^{Todo?} %^G\nSCHEDULED: %^t\n:PROPERTIES:\n:ADDED: %U\n:END:\n %i\n %a \n%?\n")
("h" "Habit" entry (file+headline "todo.org" "Habits")
("h" "Habit" entry (file+headline "todos.org" "Habits")
"* TODO %^{Habit} %^G\nSCHEDULED: %^T\n:PROPERTIES:\n:STYLE: habit\n:ADDED: %U\n:END:\n%?\n")
("j" "Journal" entry (file+datetree "journal.org")
"* %^{Journal Entry:} %^G\nEntered on %U\n %i\n:PROPERTIES:\n:ADDED: %U\n:END:\n %a\n%?\n")
@@ -716,7 +711,6 @@ taking package.
:after org-roam org-ref
:require t
:hook (after-init-hook . org-roam-bibtex-mode))
#+end_src
** Org Babel