changelog shortlog graph tags branches files raw help

Mercurial > infra > home / changeset: sbcl

changeset 43: d70be963bfb1
parent 40: 2d74d85d7031 (current diff)
parent 42: b9e2f76128bb (diff)
child 44: 3b1dfa0741c8
child 45: cd44192f8af5
author: Richard Westhaver <ellis@rwest.io>
date: Sat, 15 Jun 2024 19:57:38 -0400
files: .sbclrc
description: sbcl
     1.1--- a/.emacs.d/ellis.el	Wed Jun 05 23:31:48 2024 +0000
     1.2+++ b/.emacs.d/ellis.el	Sat Jun 15 19:57:38 2024 -0400
     1.3@@ -33,9 +33,9 @@
     1.4 
     1.5 (setopt default-theme 'modus-vivendi-tritanopia
     1.6         user-lab-directory (join-paths user-home-directory "lab")
     1.7-        company-source-directory (join-paths user-lab-directory "comp"))
     1.8+        company-source-directory (join-paths user-home-directory "comp"))
     1.9 
    1.10-(unless (display-graphic-p) (setq default-theme 'wheatgrass))
    1.11+;; (unless (display-graphic-p) (setq default-theme 'wheatgrass))
    1.12 
    1.13 (when (linux-p) (setq dired-listing-switches "-alsh"))
    1.14 
    1.15@@ -52,11 +52,11 @@
    1.16 (keymap-set user-map "e c" #'edit-emacs-config)
    1.17 (keymap-set emacs-lisp-mode-map "C-c C-l" #'load-file)
    1.18 (keymap-set emacs-lisp-mode-map "C-c M-k" #'elisp-byte-compile-file)
    1.19+(keymap-set user-map "v t" #'org-tags-view)
    1.20 
    1.21 (require 'paredit)
    1.22-(add-hook 'common-lisp-mode-hook #'enable-paredit-mode)
    1.23-(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
    1.24-
    1.25+(add-hook 'lisp-mode-hook #'enable-paredit-mode)
    1.26+(add-hook 'slime-editing-mode-hook #'enable-paredit-mode)
    1.27 (repeat-mode)
    1.28 
    1.29 (defun remember-project ()
    1.30@@ -68,25 +68,21 @@
    1.31   (interactive)
    1.32   (project-remember-projects-under user-lab-directory t))
    1.33 
    1.34+(defun remember-comp-projects ()
    1.35+  (interactive)
    1.36+  (project-remember-projects-under company-source-directory t))
    1.37+
    1.38 (keymap-global-set "C-<tab>" #'hippie-expand)
    1.39 (keymap-set minibuffer-local-map "C-<tab>" #'hippie-expand)
    1.40 (keymap-set ctl-x-x-map "p p" #'remember-project)
    1.41 (keymap-set ctl-x-x-map "p l" #'remember-lab-projects)
    1.42 
    1.43-(add-hook 'prog-mode-hook #'skt-mode)
    1.44-(add-hook 'org-mode-hook #'skt-mode)
    1.45+(add-hook 'prog-mode-hook #'skel-minor-mode)
    1.46+(add-hook 'org-mode-hook #'skel-minor-mode)
    1.47 (add-hook 'prog-mode-hook #'company-mode)
    1.48 
    1.49 (add-hook 'notmuch-message-mode-hook #'turn-on-orgtbl)
    1.50 
    1.51-(setopt skt-enable-tempo-elements t
    1.52-        skt-completing-read t
    1.53-        skt-delete-duplicate-marks t)
    1.54-
    1.55-(keymap-set skt-mode-map "C-c M-b" #'tempo-backward-mark)
    1.56-(keymap-set skt-mode-map "C-c M-f" #'tempo-forward-mark)
    1.57-(keymap-set skt-mode-map "C-c M-a" #'tempo-complete-tag)
    1.58-
    1.59 (use-package markdown-mode :ensure t)
    1.60 
    1.61 (use-package ol-notmuch :ensure t)
    1.62@@ -101,7 +97,7 @@
    1.63    smtpmail-debug-info t
    1.64    message-default-mail-headers "Cc: \nBcc: \n"
    1.65    message-kill-buffer-on-exit t
    1.66-   user-mail-address "ellis@rwest.io"
    1.67+   user-mail-address "richard.westhaver@gmail.com"
    1.68    user-full-name "Richard Westhaver"
    1.69    notmuch-hello-sections '(notmuch-hello-insert-saved-searches 
    1.70                             notmuch-hello-insert-search 
    1.71@@ -194,8 +190,8 @@
    1.72   :init
    1.73   (defun yt-dl-it (url)
    1.74     "Downloads the URL in an async shell"
    1.75-    (let ((default-directory "~/media/yt"))
    1.76-      (async-shell-command (format "youtube-dl %s" url))))
    1.77+    (let ((default-directory user-stash-directory))
    1.78+      (async-shell-command (format "yt-dlp %s" url))))
    1.79 
    1.80   (defun elfeed-youtube-dl (&optional use-generic-p)
    1.81     "Youtube-DL link"
    1.82@@ -212,25 +208,30 @@
    1.83   (keymap-set user-map "e f" #'elfeed)
    1.84   (keymap-set user-map "e F" #'elfeed-update))
    1.85 
    1.86+(use-package elfeed-tube
    1.87+  :ensure t
    1.88+  :after elfeed
    1.89+  :config
    1.90+  ;; (elfeed-tube-setup)
    1.91+  (elfeed-tube-add-feeds '("detroit techno" "boiler room dj" "brad mehldau" "chris 'daddy' dave"))
    1.92+  :bind (:map elfeed-show-mode-map
    1.93+         ("F" . elfeed-tube-fetch)
    1.94+         ([remap save-buffer] . elfeed-tube-save)
    1.95+         :map elfeed-search-mode-map
    1.96+         ("F" . elfeed-tube-fetch)
    1.97+         ([remap save-buffer] . elfeed-tube-save)))
    1.98+
    1.99+(use-package elfeed-tube-mpv
   1.100+  :ensure t
   1.101+  :bind (:map elfeed-show-mode-map
   1.102+              ("C-c C-f" . elfeed-tube-mpv-follow-mode)
   1.103+              ("C-c C-w" . elfeed-tube-mpv-where)))
   1.104+
   1.105 (use-package org-mime :ensure t)
   1.106 
   1.107 (use-package sh-script
   1.108   :hook (sh-mode . flymake-mode))
   1.109 
   1.110-(use-package tempo
   1.111-  :custom
   1.112-  tempo-interactive t
   1.113-  :config
   1.114-  (tempo-define-template 
   1.115-   "org:readme"
   1.116-   '("#+TITLE: " p n>
   1.117-     "#+AUTHOR: " user-full-name " <" user-mail-address ">" n>)
   1.118-   "org:readme"
   1.119-   "Insert a readme.org file template.")
   1.120-  (tempo-define-template "org:src"
   1.121-                         '("#+begin_src " p n>
   1.122-                           "#+end_src" n>)
   1.123-                         "org:src"))
   1.124 ;;; Org Config
   1.125 (keymap-set user-map "t" #'org-todo)
   1.126 
   1.127@@ -242,6 +243,7 @@
   1.128 			     (lisp . t)
   1.129 			     (org . t)
   1.130 			     (eshell . t)
   1.131+                             (calc . t)
   1.132 			     (sed . t)
   1.133 			     (awk . t)
   1.134 			     (dot . t)
   1.135@@ -284,7 +286,448 @@
   1.136   (add-hook 'ibuffer-mode-hook #'all-the-icons-ibuffer-mode))
   1.137 
   1.138 ;; strangerdanger
   1.139-(setq slime-enable-evaluate-in-emacs t)
   1.140+;; (setq slime-enable-evaluate-in-emacs t)
   1.141+
   1.142+(defun org-word-count (beg end
   1.143+                           &optional count-latex-macro-args?
   1.144+                           count-footnotes?)
   1.145+  "Report the number of words in the Org mode buffer or selected region.
   1.146+Ignores:
   1.147+- comments
   1.148+- tables
   1.149+- source code blocks (#+BEGIN_SRC ... #+END_SRC, and inline blocks)
   1.150+- hyperlinks (but does count words in hyperlink descriptions)
   1.151+- tags, priorities, and TODO keywords in headers
   1.152+- sections tagged as 'not for export'.
   1.153+
   1.154+The text of footnote definitions is ignored, unless the optional argument
   1.155+COUNT-FOOTNOTES? is non-nil.
   1.156+
   1.157+If the optional argument COUNT-LATEX-MACRO-ARGS? is non-nil, the word count
   1.158+includes LaTeX macro arguments (the material between {curly braces}).
   1.159+Otherwise, and by default, every LaTeX macro counts as 1 word regardless
   1.160+of its arguments."
   1.161+  (interactive "r")
   1.162+  (unless mark-active
   1.163+    (setf beg (point-min)
   1.164+          end (point-max)))
   1.165+  (let ((wc 0)
   1.166+        (latex-macro-regexp "\\\\[A-Za-z]+\\(\\[[^]]*\\]\\|\\){\\([^}]*\\)}"))
   1.167+    (save-excursion
   1.168+      (goto-char beg)
   1.169+      (while (< (point) end)
   1.170+        (cond
   1.171+         ;; Ignore comments.
   1.172+         ((or (org-in-commented-line) (org-at-table-p))
   1.173+          nil)
   1.174+         ;; Ignore hyperlinks. But if link has a description, count
   1.175+         ;; the words within the description.
   1.176+         ((looking-at org-bracket-link-analytic-regexp)
   1.177+          (when (match-string-no-properties 5)
   1.178+            (let ((desc (match-string-no-properties 5)))
   1.179+              (save-match-data
   1.180+                (cl-incf wc (length (remove "" (org-split-string
   1.181+                                                desc "\\W")))))))
   1.182+          (goto-char (match-end 0)))
   1.183+         ((looking-at org-any-link-re)
   1.184+          (goto-char (match-end 0)))
   1.185+         ;; Ignore source code blocks.
   1.186+         ((org-in-regexps-block-p "^#\\+BEGIN_SRC\\W" "^#\\+END_SRC\\W")
   1.187+          nil)
   1.188+         ;; Ignore inline source blocks, counting them as 1 word.
   1.189+         ((save-excursion
   1.190+            (backward-char)
   1.191+            (looking-at org-babel-inline-src-block-regexp))
   1.192+          (goto-char (match-end 0))
   1.193+          (setf wc (+ 2 wc)))
   1.194+         ;; Count latex macros as 1 word, ignoring their arguments.
   1.195+         ((save-excursion
   1.196+            (backward-char)
   1.197+            (looking-at latex-macro-regexp))
   1.198+          (goto-char (if count-latex-macro-args?
   1.199+                         (match-beginning 2)
   1.200+                       (match-end 0)))
   1.201+          (setf wc (+ 2 wc)))
   1.202+         ;; Ignore footnotes.
   1.203+         ((and (not count-footnotes?)
   1.204+               (or (org-footnote-at-definition-p)
   1.205+                   (org-footnote-at-reference-p)))
   1.206+          nil)
   1.207+         (t
   1.208+          (let ((contexts (org-context)))
   1.209+            (cond
   1.210+             ;; Ignore tags and TODO keywords, etc.
   1.211+             ((or (assoc :todo-keyword contexts)
   1.212+                  (assoc :priority contexts)
   1.213+                  (assoc :keyword contexts)
   1.214+                  (assoc :checkbox contexts))
   1.215+              nil)
   1.216+             ;; Ignore sections marked with tags that are
   1.217+             ;; excluded from export.
   1.218+             ((assoc :tags contexts)
   1.219+              (if (intersection (org-get-tags-at) org-export-exclude-tags
   1.220+                                :test 'equal)
   1.221+                  (org-forward-same-level 1)
   1.222+                nil))
   1.223+             (t
   1.224+              (cl-incf wc))))))
   1.225+        (re-search-forward "\\w+\\W*")))
   1.226+    (message (format "%d words in %s." wc
   1.227+                     (if mark-active "region" "buffer")))))
   1.228+
   1.229+(defun org-check-misformatted-subtree ()
   1.230+  "Check misformatted entries in the current buffer."
   1.231+  (interactive)
   1.232+  (show-all)
   1.233+  (org-map-entries
   1.234+   (lambda ()
   1.235+     (when (and (move-beginning-of-line 2)
   1.236+                (not (looking-at org-heading-regexp)))
   1.237+       (if (or (and (org-get-scheduled-time (point))
   1.238+                    (not (looking-at (concat "^.*" org-scheduled-regexp))))
   1.239+               (and (org-get-deadline-time (point))
   1.240+                    (not (looking-at (concat "^.*" org-deadline-regexp)))))
   1.241+           (when (y-or-n-p "Fix this subtree? ")
   1.242+             (message "Call the function again when you're done fixing this subtree.")
   1.243+             (recursive-edit))
   1.244+         (message "All subtrees checked."))))))
   1.245+
   1.246+(defun org-sort-list-by-checkbox-type ()
   1.247+  "Sort list items according to Checkbox state."
   1.248+  (interactive)
   1.249+  (org-sort-list
   1.250+   nil ?f
   1.251+   (lambda ()
   1.252+     (if (looking-at org-list-full-item-re)
   1.253+         (cdr (assoc (match-string 3)
   1.254+                     '(("[X]" . 1) ("[-]" . 2) ("[ ]" . 3) (nil . 4))))
   1.255+       4))))
   1.256+
   1.257+(defun org-time-string-to-seconds (s)
   1.258+  "Convert a string HH:MM:SS to a number of seconds."
   1.259+  (cond
   1.260+   ((and (stringp s)
   1.261+         (string-match "\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\)" s))
   1.262+    (let ((hour (string-to-number (match-string 1 s)))
   1.263+          (min (string-to-number (match-string 2 s)))
   1.264+          (sec (string-to-number (match-string 3 s))))
   1.265+      (+ (* hour 3600) (* min 60) sec)))
   1.266+   ((and (stringp s)
   1.267+         (string-match "\\([0-9]+\\):\\([0-9]+\\)" s))
   1.268+    (let ((min (string-to-number (match-string 1 s)))
   1.269+          (sec (string-to-number (match-string 2 s))))
   1.270+      (+ (* min 60) sec)))
   1.271+   ((stringp s) (string-to-number s))
   1.272+   (t s)))
   1.273+
   1.274+(defun org-time-seconds-to-string (secs)
   1.275+  "Convert a number of seconds to a time string."
   1.276+  (cond ((>= secs 3600) (format-seconds "%h:%.2m:%.2s" secs))
   1.277+        ((>= secs 60) (format-seconds "%m:%.2s" secs))
   1.278+        (t (format-seconds "%s" secs))))
   1.279+
   1.280+(defmacro with-time (time-output-p &rest exprs)
   1.281+  "Evaluate an org-table formula, converting all fields that look
   1.282+like time data to integer seconds.  If TIME-OUTPUT-P then return
   1.283+the result as a time value."
   1.284+  (list
   1.285+   (if time-output-p 'org-time-seconds-to-string 'identity)
   1.286+   (cons 'progn
   1.287+         (mapcar
   1.288+          (lambda (expr)
   1.289+            `,(cons (car expr)
   1.290+                    (mapcar
   1.291+                     (lambda (el)
   1.292+                       (if (listp el)
   1.293+                           (list 'with-time nil el)
   1.294+                         (org-time-string-to-seconds el)))
   1.295+                     (cdr expr))))
   1.296+          `,@exprs))))
   1.297+
   1.298+(defun org-hex-strip-lead (str)
   1.299+  (if (and (> (length str) 2) (string= (substring str 0 2) "0x"))
   1.300+      (substring str 2) str))
   1.301+
   1.302+(defun org-hex-to-hex (int)
   1.303+  (format "0x%x" int))
   1.304+
   1.305+(defun org-hex-to-dec (str)
   1.306+  (cond
   1.307+   ((and (stringp str)
   1.308+         (string-match "\\([0-9a-f]+\\)" (setf str (org-hex-strip-lead str))))
   1.309+    (let ((out 0))
   1.310+      (mapc
   1.311+       (lambda (ch)
   1.312+         (setf out (+ (* out 16)
   1.313+                      (if (and (>= ch 48) (<= ch 57)) (- ch 48) (- ch 87)))))
   1.314+       (coerce (match-string 1 str) 'list))
   1.315+      out))
   1.316+   ((stringp str) (string-to-number str))
   1.317+   (t str)))
   1.318+
   1.319+(defmacro with-hex (hex-output-p &rest exprs)
   1.320+  "Evaluate an org-table formula, converting all fields that look
   1.321+    like hexadecimal to decimal integers.  If HEX-OUTPUT-P then
   1.322+    return the result as a hex value."
   1.323+  (list
   1.324+   (if hex-output-p 'org-hex-to-hex 'identity)
   1.325+   (cons 'progn
   1.326+         (mapcar
   1.327+          (lambda (expr)
   1.328+            `,(cons (car expr)
   1.329+                    (mapcar (lambda (el)
   1.330+                              (if (listp el)
   1.331+                                  (list 'with-hex nil el)
   1.332+                                (org-hex-to-dec el)))
   1.333+                            (cdr expr))))
   1.334+          `,@exprs))))
   1.335+
   1.336+(require 'mm-url) ; to include mm-url-decode-entities-string
   1.337+
   1.338+(defun org-insert-link-with-title ()
   1.339+  "Insert org link where default description is set to html title."
   1.340+  (interactive)
   1.341+  (let* ((url (read-string "URL: "))
   1.342+         (title (get-html-title-from-url url)))
   1.343+    (org-insert-link nil url title)))
   1.344+
   1.345+(defun get-html-title-from-url (url)
   1.346+  "Return content in <title> tag."
   1.347+  (let (x1 x2 (download-buffer (url-retrieve-synchronously url)))
   1.348+    (save-excursion
   1.349+      (set-buffer download-buffer)
   1.350+      (beginning-of-buffer)
   1.351+      (setq x1 (search-forward "<title>"))
   1.352+      (search-forward "</title>")
   1.353+      (setq x2 (search-backward "<"))
   1.354+      (mm-url-decode-entities-string (buffer-substring-no-properties x1 x2)))))
   1.355+
   1.356+(defun org-remove-empty-propert-drawers ()
   1.357+  "*Remove all empty property drawers in current file."
   1.358+  (interactive)
   1.359+  (unless (eq major-mode 'org-mode)
   1.360+    (error "You need to turn on Org mode for this function."))
   1.361+  (save-excursion
   1.362+    (goto-char (point-min))
   1.363+    (while (re-search-forward ":PROPERTIES:" nil t)
   1.364+      (save-excursion
   1.365+        (org-remove-empty-drawer-at "PROPERTIES" (match-beginning 0))))))
   1.366+
   1.367+(defun check-for-clock-out-note ()
   1.368+  (interactive)
   1.369+  (save-excursion
   1.370+    (org-back-to-heading)
   1.371+    (let ((tags (org-get-tags)))
   1.372+      (and tags (message "tags: %s " tags)
   1.373+           (when (member "clocknote" tags)
   1.374+             (org-add-note))))))
   1.375+
   1.376+(add-hook 'org-clock-out-hook 'check-for-clock-out-note)
   1.377+
   1.378+(defun org-list-files (dirs ext)
   1.379+  "Function to create list of org files in multiple subdirectories.
   1.380+This can be called to generate a list of files for
   1.381+org-agenda-files or org-refile-targets.
   1.382+
   1.383+DIRS is a list of directories.
   1.384+
   1.385+EXT is a list of the extensions of files to be included."
   1.386+  (let ((dirs (if (listp dirs)
   1.387+                  dirs
   1.388+                (list dirs)))
   1.389+        (ext (if (listp ext)
   1.390+                 ext
   1.391+               (list ext)))
   1.392+        files)
   1.393+    (mapc
   1.394+     (lambda (x)
   1.395+       (mapc
   1.396+        (lambda (y)
   1.397+          (setq files
   1.398+                (append files
   1.399+                        (file-expand-wildcards
   1.400+                         (concat (file-name-as-directory x) "*" y)))))
   1.401+        ext))
   1.402+     dirs)
   1.403+    (mapc
   1.404+     (lambda (x)
   1.405+       (when (or (string-match "/.#" x)
   1.406+                 (string-match "#$" x))
   1.407+         (setq files (delete x files))))
   1.408+     files)
   1.409+    files))
   1.410+
   1.411+(defvar org-agenda-directories (list org-directory user-lab-directory)
   1.412+  "List of directories containing org files.")
   1.413+(defvar org-agenda-extensions '(".org")
   1.414+  "List of extensions of agenda files")
   1.415+
   1.416+(defun org-set-agenda-files ()
   1.417+  (interactive)
   1.418+  (setq org-agenda-files (org-list-files
   1.419+                          org-agenda-directories
   1.420+                          org-agenda-extensions)))
   1.421+
   1.422+(add-hook 'after-init-hook 'org-set-agenda-files)
   1.423+
   1.424+;;; Skel Config
   1.425+(use-package skel
   1.426+  :requires skel
   1.427+  :load-path user-emacs-lib-directory
   1.428+  :custom
   1.429+  tempo-interactive t  
   1.430+  auto-insert 'no-modify
   1.431+  auto-insert-query nil)
   1.432+
   1.433+(use-package skt
   1.434+  :requires (skel skt)
   1.435+  :load-path user-emacs-lib-directory
   1.436+  :custom
   1.437+  skt-enable-tempo-elements t
   1.438+  skt-delete-duplicate-marks t
   1.439+  :config
   1.440+  (defvar skt-default-version "0.1.0")
   1.441+  (keymap-set skt-minor-mode-map "b" #'tempo-backward-mark)
   1.442+  (keymap-set skt-minor-mode-map "f" #'tempo-forward-mark)
   1.443+  (keymap-set skt-minor-mode-map "SPC" #'tempo-complete-tag)
   1.444+  (keymap-set skt-minor-mode-map "t" #'skt-add-tag)
   1.445+
   1.446+  (defvar skt-skeleton-path-function #'abbreviate-file-name
   1.447+    "Function to be called when expanding file-header skeletons. Useful to
   1.448+rebind locally inside a project or module, where you want to delete some
   1.449+prefix or replace it.")
   1.450+
   1.451+  (defun skt-buffer-path (&optional function)
   1.452+    (let ((path (or buffer-file-name (format "%s.lisp" (gensym "scratch-")))))
   1.453+      (funcall (or function skt-skeleton-path-function) path)))
   1.454+
   1.455+  (defun skt-skelfile-path ()
   1.456+    (if (string= (file-name-nondirectory buffer-file-name) "skelfile")
   1.457+        "skelfile"
   1.458+      (skt-buffer-path)))
   1.459+
   1.460+  ;; functions
   1.461+  (skt-define-function capture (:abbrev "capture" :tag t) org-capture)
   1.462+  (skt-define-function agenda (:abbrev "agenda" :tag t) org-agenda)
   1.463+  (skt-define-function mjump (:abbrev "mjump" :tag t) bookmark-jump)
   1.464+  (skt-define-function bjump (:abbrev "bjump" :tag t) ibuffer-jump)
   1.465+  (skt-define-function rjump (:abbrev "rjump" :tag t)
   1.466+    (lambda () (jump-to-register (read-char "register: "))))
   1.467+  (skt-define-function pjump (:abbrev "pjump" :tag t) (lambda () (project-switch-project default-directory)))
   1.468+
   1.469+  ;; templates
   1.470+  (skt-define-template readme (:mode org-mode :tag t)
   1.471+    "#+title: " (p "title: ") n
   1.472+    "#+description: " (p "description: ") n
   1.473+    "#+author: " user-full-name n
   1.474+    "#+email:" user-mail-address n
   1.475+    "#+setupfile: clean.theme" n
   1.476+    "#+export_file_name: index" n>
   1.477+    p n> n>
   1.478+    ":info:" n>
   1.479+    "+ version :: " skt-default-version n
   1.480+    ":end:" n>)
   1.481+
   1.482+  (skt-define-template clean.theme (:mode org-mode :tag t)
   1.483+    "#+setupfile: " (join-paths company-cdn-url "org/clean.theme"))
   1.484+
   1.485+  ;; TODO 2024-06-04: 
   1.486+  ;; (skt-define-template defsystem (:mode lisp-mode :tag t :abbrev "defsystem"))
   1.487+  ;; (skt-define-template defpackage (:mode lisp-mode :tag t :abbrev "defpackage"))
   1.488+  ;; (skt-define-template defpkg (:mode lisp-mode :tag t :abbrev "defpkg"))
   1.489+
   1.490+  (skt-define-template defmacro (:abbrev "(defmacro" :tag t :mode lisp-mode)
   1.491+    "(defmacro " (p "Name: ") " (" (p "Args: ") ")" > n> r ")")
   1.492+
   1.493+  (skt-define-template defun (:abbrev "(defun" :tag t :mode lisp-mode)
   1.494+    "(defun " (p "Name: ") " (" (p "Args: ") ")" > n> r ")")
   1.495+
   1.496+  (skt-define-template defvar (:abbrev "(defvar" :tag t :mode lisp-mode)
   1.497+    > "(defvar " > r ")")
   1.498+
   1.499+  ;; skeletons
   1.500+  (skt-define-skeleton head (:abbrev "head" :mode lisp-mode)
   1.501+    "description: "
   1.502+    ";;; " (skt-buffer-path 'file-name-nondirectory) " --- " str \n \n ";; " _ \n \n ";;; Code:" \n >)
   1.503+
   1.504+  (skt-define-skeleton head (:abbrev "head" :mode skel-mode)
   1.505+    "description: "
   1.506+    ";;; " (skt-skelfile-path) " --- " str " -*- mode: skel; -*-" \n _)
   1.507+
   1.508+  (skt-define-skeleton head (:abbrev "head" :mode org-mode)
   1.509+    "title: "
   1.510+    "#+title: " str \n
   1.511+    "#+author: " (skeleton-read "author: ") \n
   1.512+    "#+description: " (skeleton-read "description: ") \n
   1.513+    "#+setupfile: clean.theme" \n > _)
   1.514+
   1.515+  (skt-define-skeleton head (:abbrev "head" :mode rust-mode)
   1.516+    "description: "
   1.517+    "//! " (skt-buffer-path 'file-name-nondirectory) " --- " str \n \n "// " _ \n \n "//! Code: " \n >)
   1.518+
   1.519+  (skt-define-skeleton system-head (:abbrev "system-head" :mode lisp-mode)
   1.520+    "system-name: "
   1.521+    ";;; " (skt-buffer-path) " --- "
   1.522+    '(setq v1 (file-name-base (skt-buffer-path))) (capitalize v1)
   1.523+    " Sytem Definitions" \n
   1.524+    > "(defsystem :" v1 \n
   1.525+    > ":depends-on (:std :log)" \n
   1.526+    > ":components ((:file \"pkg\")" _ "))")
   1.527+
   1.528+  (skt-define-skeleton pkg-head (:abbrev "pkg-head" :mode lisp-mode)
   1.529+    "ignored"
   1.530+    ";;; " (skt-buffer-path 'file-name-nondirectory) " --- "
   1.531+    '(setq v1 (skeleton-read "name: ")) v1 " Package Definitions" \n
   1.532+    > "(defpkg :" v1 \n
   1.533+    > ":use (:std :log))" \n \n
   1.534+    > "(in-package :" v1 ")" \n >)
   1.535+  
   1.536+  (skt-define-skeleton crate-head (:abbrev "crate-head" :mode conf-toml-mode)
   1.537+    "ignored"
   1.538+    "### " (skt-buffer-path 'file-name-nondirectory) " --- " 
   1.539+    '(setq v1 (skeleton-read "name: ")) v1 " Cargo Manifest" \n >
   1.540+    "[package]" \n
   1.541+    "name = \"" v1 "\"" \n
   1.542+    "version = \"" skt-default-version "\"" \n
   1.543+    "[dependencies]" \n >)
   1.544+
   1.545+  (skt-define-skeleton local-vars
   1.546+      (:tag t :abbrev "local-vars"
   1.547+            :docstring "Insert a local variables section.  Use current comment syntax if any.")
   1.548+    (completing-read "Mode: " obarray
   1.549+		     (lambda (symbol)
   1.550+		       (if (commandp symbol)
   1.551+			   (string-match "-mode$" (symbol-name symbol))))
   1.552+		     t)
   1.553+    '(save-excursion
   1.554+       (if (re-search-forward page-delimiter nil t)
   1.555+	   (error "Not on last page")))
   1.556+    comment-start "Local Variables:" comment-end \n
   1.557+    comment-start "mode: " str
   1.558+    & -5 | '(kill-line 0) & -1 | comment-end \n
   1.559+    ( (completing-read (format "Variable, %s: " skeleton-subprompt)
   1.560+		       obarray
   1.561+		       (lambda (symbol)
   1.562+		         (or (eq symbol 'eval)
   1.563+			     (custom-variable-p symbol)))
   1.564+		       t)
   1.565+      comment-start str ": "
   1.566+      (read-from-minibuffer "Expression: " nil read-expression-map nil
   1.567+			    'read-expression-history) | _
   1.568+      comment-end \n)
   1.569+    resume:
   1.570+    comment-start "End:" comment-end \n)
   1.571+
   1.572+  ;; autoinsert
   1.573+  (skt-register-auto-insert "skelfile" #'skt-template-skel-head)
   1.574+  (skt-register-auto-insert "readme.org" #'skt-template-org-readme)
   1.575+  (skt-register-auto-insert "Cargo.toml" #'skt-template-conf-toml-crate-head)
   1.576+  (skt-register-auto-insert "pkg.lisp" #'skt-template-lisp-pkg-head)
   1.577+  (skt-register-auto-insert ".*[.]asd" #'skt-template-lisp-system-head)
   1.578+  (skt-register-auto-insert ".*[.]lisp" #'skt-template-lisp-head)
   1.579+  (skt-register-auto-insert ".*[.].rs" #'skt-template-rust-head)
   1.580+  (auto-insert-mode t)
   1.581+  (keymap-set skel-minor-mode-map "C-<return>" 'company-tempo))
   1.582 
   1.583 (provide 'ellis)
   1.584 ;;; ellis.el ends here
     2.1--- a/.sbclrc	Wed Jun 05 23:31:48 2024 +0000
     2.2+++ b/.sbclrc	Sat Jun 15 19:57:38 2024 -0400
     2.3@@ -1,16 +1,23 @@
     2.4 ;;; .sbclrc --- sbcl init file -*- mode: common-lisp; -*-
     2.5+(in-package :cl-user)
     2.6 (require :asdf)
     2.7-
     2.8+(require :sb-concurrency)
     2.9+(require :sb-cltl2)
    2.10+(require :sb-rotate-byte)
    2.11+(require :sb-sprof)
    2.12 (setq *debug-beginner-help-p* nil
    2.13       ;; *print-case* :downcase
    2.14       *print-level* 32
    2.15       *print-length* 256)
    2.16 
    2.17+(defvar *quicklisp-setup* (or (probe-file #P"/usr/local/share/lisp/quicklisp/setup.lisp")
    2.18+                              (probe-file (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))))
    2.19+
    2.20 #-quicklisp
    2.21-(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" "/usr/local/share/lisp/")))
    2.22-  (when (probe-file quicklisp-init)
    2.23-    (load quicklisp-init)))
    2.24+(when *quicklisp-setup*
    2.25+  (load *quicklisp-setup*))
    2.26 ;; (ql:quickload :clouseau)
    2.27+
    2.28 (defun include-projects-from (path)
    2.29   "Add PATH to QL;*LOCAL-PROJECT-DIRECTORIES* and ASDF:*CENTRAL-REGISTRY*."
    2.30   (pushnew path ql:*local-project-directories*)