Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Error loading "slime" autoloads #779

Open
plibby opened this issue Jun 18, 2023 · 4 comments
Open

Warning: Error loading "slime" autoloads #779

plibby opened this issue Jun 18, 2023 · 4 comments

Comments

@plibby
Copy link

plibby commented Jun 18, 2023

Hello!

I'm seeing the following warning every time I open Emacs (28.2):
Warning (emacs): Error loading "slime" autoloads: (wrong-type-argument stringp nil)

I'm not able to get a better debug trace through running emacs with --debug-init, any suggestions on what else I can provide would be welcomed!

@luismbo
Copy link
Member

luismbo commented Jun 20, 2023

Try starting Emacs without any config using -q, invoke M-x toggle-debug-on-error and then load SLIME.

@plibby
Copy link
Author

plibby commented Jun 21, 2023

No problem that way. My guess is it's something to do with using elpaca to manage my install? Not having this issue with a direct config load. Here's what I'm doing with elpaca:

;;The standard setup from the elpaca README
(defvar elpaca-installer-version 0.4)
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
			:ref nil
			:files (:defaults (:exclude "extensions"))
			:build (:not elpaca--activate-package)))
(let* ((repo  (expand-file-name "elpaca/" elpaca-repos-directory))
 (build (expand-file-name "elpaca/" elpaca-builds-directory))
 (order (cdr elpaca-order))
 (default-directory repo))
  (add-to-list 'load-path (if (file-exists-p build) build repo))
  (unless (file-exists-p repo)
    (make-directory repo t)
    (when (< emacs-major-version 28) (require 'subr-x))
    (condition-case-unless-debug err
  (if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
	   ((zerop (call-process "git" nil buffer t "clone"
				 (plist-get order :repo) repo)))
	   ((zerop (call-process "git" nil buffer t "checkout"
				 (or (plist-get order :ref) "--"))))
	   (emacs (concat invocation-directory invocation-name))
	   ((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
				 "--eval" "(byte-recompile-directory \".\" 0 'force)")))
	   ((require 'elpaca))
	   ((elpaca-generate-autoloads "elpaca" repo)))
      (kill-buffer buffer)
    (error "%s" (with-current-buffer buffer (buffer-string))))
((error) (warn "%s" err) (delete-directory repo 'recursive))))
  (unless (require 'elpaca-autoloads nil t)
    (require 'elpaca)
    (elpaca-generate-autoloads "elpaca" repo)
    (load "./elpaca-autoloads")))
(add-hook 'after-init-hook #'elpaca-process-queues)
(elpaca `(,@elpaca-order))

;; Install use-package support
(elpaca elpaca-use-package
  ;; Enable :elpaca use-package keyword.
  (elpaca-use-package-mode)
  ;; Assume :elpaca t unless otherwise specified.
  (setq elpaca-use-package-by-default t))

;; Block until current queue processed.
(elpaca-wait)

;;Install and load slime with basic config
(use-package slime
  :init
    (require 'slime-autoloads)
    (add-to-list 'exec-path "/usr/local/bin")
    (setq inferior-lisp-program "sbcl"))

Not sure what else I can share but thank you very much for trying to help me out!

@luismbo
Copy link
Member

luismbo commented Jun 22, 2023

What about evaluating that config after emacs -q starts? That way you should get a backtrace.

@plibby
Copy link
Author

plibby commented Jun 23, 2023

Unfortunately I didn't get anything. I still get the Warning (emacs): Error loading "slime" autoloads: (wrong-type-argument stringp nil) but no errors logged. It must be something in elpaca, so I may want to create an issue over on their repo. Definitely wanted to flag here though in case this crops up for others as I haven't had any issues with other packages (so far 🤞🏻) and with elpaca growing in popularity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants