From b2942e2a078597ec7f2b2847a03cd6bc702f7c45 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 1 Jun 2026 00:07:04 -0700 Subject: [PATCH] emacs: stabilize elpaca package recipes --- dotfiles/emacs.d/README.org | 27 ++++++++++++++++++++++++--- dotfiles/emacs.d/init.el | 13 +++++++++---- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 013d1ca2..392ae691 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -1383,8 +1383,12 @@ Paradox is a package.el extension. I have no use for it now that I use straight. #+END_SRC ** load-dir #+BEGIN_SRC emacs-lisp +(elpaca `(load-dir :host github :repo "emacs-straight/load-dir" + :branch "master" + :protocol https + :wait t)) (use-package load-dir - :ensure (:host github :repo "emacs-straight/load-dir") + :ensure nil :demand t :config (progn @@ -1462,7 +1466,8 @@ The file server file for this emacs instance no longer exists.") #+END_SRC ** discover-my-major #+BEGIN_SRC emacs-lisp -(use-package discover-my-major) +(use-package discover-my-major + :disabled t) #+END_SRC ** refine #+BEGIN_SRC emacs-lisp @@ -4037,6 +4042,7 @@ This is useful with server mode when editing gmail messages. I think that it is ** android-mode #+BEGIN_SRC emacs-lisp (use-package android-mode + :ensure (:protocol https) :defer t :config (progn @@ -4110,7 +4116,8 @@ Ensure all themes that I use are installed: forest-blue-theme flatland-theme afternoon-theme cyberpunk-theme dracula-theme)) -(mapcar #'elpaca-try packages-appearance) +(dolist (package packages-appearance) + (eval `(use-package ,package :defer t) t)) (use-package doom-themes :defer t) @@ -4282,8 +4289,22 @@ load-theme hook (See the heading below). #+BEGIN_SRC emacs-lisp (defvar imalison:appearance-setup-done nil) +(defun imalison:ensure-theme-load-path (theme) + (when (boundp 'elpaca-builds-directory) + (when-let ((theme-dir + (seq-find + (lambda (dir) + (file-exists-p + (expand-file-name (format "%s-theme.el" theme) dir))) + (directory-files + elpaca-builds-directory + t + directory-files-no-dot-files-regexp)))) + (add-to-list 'custom-theme-load-path theme-dir)))) + (defun imalison:appearance-setup-hook (&rest args) (unless imalison:appearance-setup-done + (imalison:ensure-theme-load-path imalison:dark-theme) (unless (member imalison:dark-theme custom-enabled-themes) (load-theme imalison:dark-theme t)) (apply 'imalison:appearance args) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index 60a58a86..340cf00c 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -135,13 +135,18 @@ ;; Some split packages fall through the active menus in this config. Give ;; Elpaca an explicit source so startup doesn't get stuck on recipe lookup or ;; stale branch-mapped clones. -(elpaca `(queue :host github :repo "emacs-straight/queue")) +(elpaca `(queue :host github :repo "emacs-straight/queue" + :branch "master" + :protocol https)) (elpaca `(with-editor :host github :repo "magit/with-editor" - :branch "main")) + :branch "main" + :protocol https)) (elpaca `(git-commit :host github :repo "magit/magit" - :files ("lisp/git-commit.el" "lisp/git-commit-pkg.el"))) + :files ("lisp/git-commit.el" "lisp/git-commit-pkg.el") + :protocol https)) (elpaca `(magit-section :host github :repo "magit/magit" - :files ("lisp/magit-section.el" "lisp/magit-section-pkg.el"))) + :files ("lisp/magit-section.el" "lisp/magit-section-pkg.el") + :protocol https)) (use-package gh :defer t