tweaks and cleanups

This commit is contained in:
Kyle Isom 2025-04-25 18:10:30 -07:00
parent c2a93d7939
commit 2e30c22798
4 changed files with 71 additions and 29 deletions

4
.gitignore vendored
View File

@ -13,3 +13,7 @@ auto-save-list
/projects /projects
/url/ /url/
/org-roam.db /org-roam.db
/.org-id-locations
/eln-cache/
/elpa/
/tramp

25
deprecated.el Normal file
View File

@ -0,0 +1,25 @@
;;; -*- lexical-binding: t; -*-
;;;
;;; This file contains elisp that I used to use, but no longer
;;; do. It's mostly here as a reference.
(keychain-refresh-environment)
(when window-system
(load-theme +DEFAULT-THEME+)
(set-frame-font (get-default-font)))
(add-hook 'after-make-frame-functions
(lambda (frame)
(if (window-system)
(set-frame-font (get-default-font)))))
;;; rust stuff --- no longer frens with rust
;; (add-hook 'rust-mode-hook #'racer-mode)
;; (add-hook 'racer-mode-hook #'eldoc-mode)
;; (add-hook 'racer-mode-hook #'company-mode)
;;
;; (require 'rust-mode)
;; (define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common)
;; (setq company-tooltip-align-annotations t)

39
init.el
View File

@ -137,7 +137,7 @@ present on disk."
(when (file-exists-p (expand-file-name "~/quicklisp/slime-helper.el")) (when (file-exists-p (expand-file-name "~/quicklisp/slime-helper.el"))
(load (expand-file-name "~/quicklisp/slime-helper.el")) (load (expand-file-name "~/quicklisp/slime-helper.el"))
(ensure-package 'slime) (ensure-package 'slime)
;; Replace "sbcl" with the path to your implementation
(setq inferior-lisp-program "sbcl") (setq inferior-lisp-program "sbcl")
(slime-setup '(slime-fancy (slime-setup '(slime-fancy
slime-autodoc slime-autodoc
@ -147,12 +147,8 @@ present on disk."
slime-truncate-lines nil) slime-truncate-lines nil)
(setq lisp-lambda-list-keyword-parameter-alignment t (setq lisp-lambda-list-keyword-parameter-alignment t
lisp-lambda-list-keyword-alignment t) lisp-lambda-list-keyword-alignment t))
;(when (executable-find "nyxt"))
(when (executable-find "nyxt")
;; load nyxt
)
)
(add-hook 'clojure-mode-hook #'enable-paredit-mode) (add-hook 'clojure-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-mode-hook #'enable-paredit-mode) (add-hook 'lisp-mode-hook #'enable-paredit-mode)
@ -160,7 +156,6 @@ present on disk."
(add-hook 'scheme-mode-hook #'enable-paredit-mode) (add-hook 'scheme-mode-hook #'enable-paredit-mode)
(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode) (add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
(message "loading %s" (emacs-path "scriba.el"))
(let ((scriba-lisp (emacs-path "scriba.el"))) (let ((scriba-lisp (emacs-path "scriba.el")))
(when (and (file-exists-p scriba-lisp) (when (and (file-exists-p scriba-lisp)
(load scriba-lisp)) (load scriba-lisp))
@ -176,15 +171,6 @@ present on disk."
(require 'rgbds-mode) (require 'rgbds-mode)
(add-to-list 'auto-mode-alist '("\\.gbasm\\'" . rgbds-mode ))))) (add-to-list 'auto-mode-alist '("\\.gbasm\\'" . rgbds-mode )))))
;;; rust stuff --- no longer frens with rust
;; (add-hook 'rust-mode-hook #'racer-mode)
;; (add-hook 'racer-mode-hook #'eldoc-mode)
;; (add-hook 'racer-mode-hook #'company-mode)
;;
;; (require 'rust-mode)
;; (define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common)
;; (setq company-tooltip-align-annotations t)
;;; Project Interaction Library for Emacs ;;; Project Interaction Library for Emacs
(require 'projectile) (require 'projectile)
(setq projectile-known-projects-file (setq projectile-known-projects-file
@ -292,9 +278,8 @@ present on disk."
(put 'upcase-region 'disabled nil) (put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil) (put 'downcase-region 'disabled nil)
(keychain-refresh-environment) ;;;; org-mode publishing
(load (emacs-path "publish.el"))
(load (emacs-path "publish"))
(defvar *host-font-size* (defvar *host-font-size*
#s(hash-table #s(hash-table
@ -327,11 +312,13 @@ present on disk."
*acceptable-font-sizes*)))) *acceptable-font-sizes*))))
(format "%s %d" *default-font* font-size))) (format "%s %d" *default-font* font-size)))
(when (window-system) (defun reset-frame-font () (interactive)
(load-theme +DEFAULT-THEME+)
(set-frame-font (get-default-font))) (set-frame-font (get-default-font)))
(add-hook 'after-make-frame-functions ;; I always end up running emacs from a GUI, easier to add a function
(lambda (frame) ;; to disable this later.
(if (window-system) (load-theme +DEFAULT-THEME+)
(set-frame-font (get-default-font))))) (set-frame-font (get-default-font))
(unless (server-running-p)
(server-start))

View File

@ -8,7 +8,24 @@
:custom :custom
(org-roam-directory (file-truename "~/org/roam/")) (org-roam-directory (file-truename "~/org/roam/"))
(org-roam-db-autosync-enable) (org-roam-db-autosync-enable)
(org-roam-capture-templates
'(("d" "default" plain "%?"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+date: %U\n#+options: toc:nil num:nil\n#+filetags:\n\n")
:unnarrowed t)
("a" "article" plain "- Source: [[%^{Url}][%^{Title}]]\n- Author: /%^{Author}/\n- Year: /%^{Year}/\n\n* Highlights / Notes\n"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+date: %U\n#+options: toc:nil num:nil\n#+filetags: article:\n\n")
:unnarrowed t)
("p" "project" plain "- Repo: [[%^{Url}][%^{title}]]\n\nOne sentence summary.\n\n** Tasks [/]"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+date: %U\n#+options: toc:nil num:nil\n#+filetags: project\n\n")
:unnarrowed t)))
(org-roam-dailies-capture-templates
'(("d" "default" entry
"* %?"
:target (file+head "%<%Y-%m-%d>.org"
"#+title: %<%Y-%m-%d>\n"))))
:bind (("C-c n l" . org-roam-buffer-toggle) :bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find) ("C-c n f" . org-roam-node-find)
("C-c n g" . org-roam-graph) ("C-c n g" . org-roam-graph)
@ -26,6 +43,14 @@
"${file}")) "${file}"))
(require 'org-roam-protocol)) (require 'org-roam-protocol))
(setq org-roam-dailies-directory (file-truename "~/org/roam/j/"))
(setq org-roam-dailies-capture-templates
'(("d" "default" entry
"* Tasks [0/1]\n + [ ] %?\n\n* How did you improve your situation?"
:target (file+head "%<%Y-%m-%d>.org"
"#+title: %<%Y-%m-%d>\n\n"))))
(defvar *org-remote-site* "/ssh:web.metacircular.net:/srv/www/metacircular/" (defvar *org-remote-site* "/ssh:web.metacircular.net:/srv/www/metacircular/"
"Where should org-mode files be published?") "Where should org-mode files be published?")
@ -129,7 +154,7 @@
;;; is mostly the graph. ;;; is mostly the graph.
("org-site-roam-static" ("org-site-roam-static"
:base-directory "~/org/roam/" :base-directory "~/org/roam/"
:base-extension "svg\\|png\\|jpg\\|gif\\|pdf" :base-extension "svg\\|png\\|jpg\\|gif\\|pdf\\|org"
:publishing-directory "~/org/publish/n/" :publishing-directory "~/org/publish/n/"
:recursive t :recursive t
:publishing-function org-publish-attachment) :publishing-function org-publish-attachment)
@ -143,6 +168,7 @@
:html-doctype "html5" :html-doctype "html5"
:html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"/s/main.css\" />" :html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"/s/main.css\" />"
:html-head-include-scripts nil :html-head-include-scripts nil
:html-link-home "/"
:html-html5-fancy t :html-html5-fancy t
:html-link-up "../" :html-link-up "../"
:publishing-directory "~/org/publish/n/" :publishing-directory "~/org/publish/n/"