minor updates to emacs config

This commit is contained in:
William Ball 2025-07-31 21:08:37 -07:00
parent 63cdd79c7d
commit eb5ff1f8d2
Signed by: wball
GPG key ID: B8682D8137B70765

View file

@ -104,7 +104,7 @@
:default-height 180
:bold-weight extrabold)
(t
:default-family "AdwaitaMono Nerd Font"
:default-family "Iosevka Nerd Font"
:default-weight normal
:variable-pitch-family "Adwaita Sans")))
(fontaine-set-preset 'regular))
@ -173,7 +173,7 @@
(use-package avy
:bind (("C-o" . avy-goto-char))
:custom
(avy-keys . '(?a ?r ?s ?t ?d ?h ?n ?e ?i ?o)))
(avy-keys . (?a ?r ?s ?t ?d ?h ?n ?e ?i ?o)))
#+end_src
* Completion
** Vertico
@ -427,7 +427,31 @@
I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/][here]] in order to have much better LaTeX previews. This is eventually supposed to be merged into emacs proper, which would be nice.
#+begin_src emacs-lisp
(use-package org
:straight (:type built-in)
:defer
:straight `(org
:fork (:host nil
:repo "https://git.tecosaur.net/tec/org-mode.git"
:branch "dev"
:remote "tecosaur")
:files (:defaults "etc")
:build t
:pre-build
(with-temp-file "org-version.el"
(require 'lisp-mnt)
(let ((version
(with-temp-buffer
(insert-file-contents "lisp/org.el")
(lm-header "version")))
(git-version
(string-trim
(with-temp-buffer
(call-process "git" nil t nil "rev-parse" "--short" "HEAD")
(buffer-string)))))
(insert
(format "(defun org-release () \"The release version of Org.\" %S)\n" version)
(format "(defun org-git-version () \"The truncate git commit hash of Org mode.\" %S)\n" git-version)
"(provide 'org-version)\n")))
:pin nil)
:init
(setq org-list-allow-alphabetical t)
:custom
@ -436,43 +460,23 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/
(org-startup-with-inline-images t)
(org-image-actual-width '(300))
(org-export-with-smart-quotes t)
(org-latex-preview-live t)
(org-directory "~/Nextcloud/org")
(org-cite-global-bibliography '("~/Nextcloud/library.bib"))
(org-agenda-files `(,org-directory))
(org-default-notes-file (mapcar (lambda (x) (concat org-directory x))
'("/todo.org" "/done.org")))
:after ox-latex
:config
(setq org-format-latex-options (plist-put org-format-latex-options :scale 0.6))
(require 'ox-latex)
(add-to-list 'org-latex-classes '("myreport" "\\documentclass[11pt]{report}"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
(require 'org-tempo)
(add-to-list 'org-src-lang-modes '("latex-macros" . latex))
(defvar org-babel-default-header-args:latex-macros
'((:results . "raw")
(:exports . "results")))
(defun prefix-all-lines (pre body)
(with-temp-buffer
(insert body)
(string-insert-rectangle (point-min) (point-max) pre)
(buffer-string)))
(defun org-babel-execute:latex-macros (body _params)
(concat
(prefix-all-lines "#+LATEX_HEADER: " body)
"\n#+HTML_HEAD_EXTRA: <div style=\"display: none\"> \\(\n"
(prefix-all-lines "#+HTML_HEAD_EXTRA: " body)
"\n#+HTML_HEAD_EXTRA: \\)</div>\n"))
:bind (("C-c c" . org-capture)
("C-c l" . org-store-link)
("C-c a" . org-agenda))
:hook (org-mode . visual-line-mode)
(org-mode . flyspell-mode))
(org-mode . flyspell-mode)
(org-mode . org-latex-preview-auto-mode))
#+end_src
** Prettify
#+begin_src emacs-lisp
@ -480,14 +484,6 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/
:hook ((org-mode . org-modern-mode)
(org-agenda-finalize . org-modern-agenda)))
#+end_src
** Citeproc
#+begin_src emacs-lisp
(use-package org-ref)
(require 'oc-csl)
(require 'oc-natbib)
(require 'oc-biblatex)
#+end_src
** Org Bloggy stuff
#+begin_src emacs-lisp
(defconst my-blog-org-dir "~/Documents/test/blog/org/")