From 649f0f3b2c5a2b1effa920a58376f6e1b4a6798d Mon Sep 17 00:00:00 2001 From: "Geir O. Jerstad" Date: Thu, 3 Jul 2025 18:31:37 +0200 Subject: [PATCH] fix: resolve emacs claude-code errors and optimize lab-tool deployments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix claude-code.el quelpa installation with correct Git URL - Make auto-compile and flycheck conditional for little-rascal - Auto-skip checks for local machines in lab-tool for faster deployments - Prevent emacs "Cannot load auto-compile" and "arrayp, nil" errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- dotfiles/geir/emacs-config/modules/claude-code.el | 13 +++---------- .../geir/emacs-config/modules/elisp-development.el | 4 ++++ packages/lab-tool/main.scm | 10 +++++++++- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/dotfiles/geir/emacs-config/modules/claude-code.el b/dotfiles/geir/emacs-config/modules/claude-code.el index 393f078..817f017 100644 --- a/dotfiles/geir/emacs-config/modules/claude-code.el +++ b/dotfiles/geir/emacs-config/modules/claude-code.el @@ -8,20 +8,12 @@ ;; Install claude-code via quelpa if not already installed (unless (package-installed-p 'claude-code) - (quelpa '(claude-code :fetcher github :repo "stevemolitor/claude-code.el"))) + (quelpa '(claude-code :fetcher git :url "https://github.com/stevemolitor/claude-code.el.git"))) ;; Claude Code - AI assistant integration (use-package claude-code :ensure nil ; Already installed via quelpa :bind-keymap ("C-c C-c" . claude-code-command-map) - :bind (("C-c C-c c" . claude-code) - ("C-c C-c s" . claude-code-send-command) - ("C-c C-c r" . claude-code-send-region) - ("C-c C-c b" . claude-code-send-buffer) - ("C-c C-c e" . claude-code-fix-error-at-point) - ("C-c C-c t" . claude-code-toggle) - ("C-c C-c k" . claude-code-kill) - ("C-c C-c n" . claude-code-new)) :custom ;; Terminal backend preference (eat is now installed via quelpa) (claude-code-terminal-type 'eat) @@ -39,6 +31,7 @@ (claude-code-newline-and-send-style 'modern) :config + (claude-code-mode) ;; Smart terminal detection - eat should be available via quelpa (defun claude-code-detect-best-terminal () "Detect the best available terminal for Claude Code." @@ -73,7 +66,7 @@ (use-package eat :ensure nil ; Already installed via quelpa :custom - (eat-term-name "xterm-256color")OB + (eat-term-name "xterm-256color") (eat-kill-buffer-on-exit t)) ;; Alternative terminal emulator (if eat fails or user prefers vterm) diff --git a/dotfiles/geir/emacs-config/modules/elisp-development.el b/dotfiles/geir/emacs-config/modules/elisp-development.el index 3e5b6f3..eb9324b 100644 --- a/dotfiles/geir/emacs-config/modules/elisp-development.el +++ b/dotfiles/geir/emacs-config/modules/elisp-development.el @@ -64,10 +64,12 @@ ;; Package linting (use-package package-lint + :if (not (string-equal system-name "little-rascal")) :commands package-lint-current-buffer) ;; Flycheck for syntax checking (use-package flycheck + :if (not (string-equal system-name "little-rascal")) :hook (emacs-lisp-mode . flycheck-mode) :config ;; Enhanced Emacs Lisp checking @@ -87,6 +89,8 @@ ;; Package development helpers (use-package auto-compile + :if (and (package-installed-p 'auto-compile) + (not (string-equal system-name "little-rascal"))) :config (auto-compile-on-load-mode) (auto-compile-on-save-mode)) diff --git a/packages/lab-tool/main.scm b/packages/lab-tool/main.scm index 15803b6..3b15de6 100755 --- a/packages/lab-tool/main.scm +++ b/packages/lab-tool/main.scm @@ -114,7 +114,15 @@ Home lab root: ~a (define (cmd-deploy machine-name . args) "Deploy configuration to machine using deploy-rs" - (let* ((options (parse-deploy-options args))) + (let* ((base-options (parse-deploy-options args)) + ;; Auto-skip checks for local machines to speed up deployment + (local-machines '("little-rascal")) + (should-skip-checks (member machine-name local-machines)) + (options (if should-skip-checks + (cons '(skip-checks . #t) base-options) + base-options))) + (when should-skip-checks + (log-info "Auto-skipping checks for local machine: ~a" machine-name)) (log-info "Deploying to machine: ~a using deploy-rs" machine-name) (if (validate-machine-name machine-name) (let ((result (deploy-machine machine-name "default" options)))