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

Problem when startup when include package with MELPA #9291

Closed
casouri opened this issue Jul 27, 2017 · 2 comments
Closed

Problem when startup when include package with MELPA #9291

casouri opened this issue Jul 27, 2017 · 2 comments

Comments

@casouri
Copy link
Contributor

casouri commented Jul 27, 2017

Issue

Warning (initialization): An error occurred while loading ‘/Users/yuan/.emacs.d/init.el’:

Invalid slot type: cfgl-package, :location, (satisfies (lambda (x) (or (stringp x) (memq x (quote (built-in local site elpa))) (and (listp x) (eq (quote recipe) (car x)))))), melpa

Show up when start up.

Symptom

I created my private layer casouri under ~/.emacs.d/private/casouri/

If I include package with MELPA

such as

(defconst casouri-packages
  '(
    ;; Nyan cat in modeline
    (nyan-mode :location melpa))

Emacs broke as described.

If I change MEPLA to EPLA

such as

(defconst casouri-packages
  '(
    ;; Nyan cat in modeline
    (nyan-mode :location elpa))

Emacs runs without any error.

Other info

macOS Sierra 10.12.5
Emacs 25.2

Full package.el

;;; packages.el --- casouri layer packages file for Spacemacs.
;;
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
;;
;; Author: Yuan Fu <yuan@missSilver>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

;;; Commentary:

;; See the Spacemacs documentation and FAQs for instructions on how to implement
;; a new layer:
;;
;;   SPC h SPC layers RET
;;
;;
;; Briefly, each package to be installed or configured by this layer should be
;; added to `casouri-packages'. Then, for each package PACKAGE:
;;
;; - If PACKAGE is not referenced by any other Spacemacs layer, define a
;;   function `casouri/init-PACKAGE' to load and initialize the package.

;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so
;;   define the functions `casouri/pre-init-PACKAGE' and/or
;;   `casouri/post-init-PACKAGE' to customize the package as it is loaded.

;;; Code:

(defconst casouri-packages
  '(
    ;; Nyan cat in modeline
    (nyan-mode :location elpa))

  ;; Examples:
  ;;
  ;; Get the package from MELPA, ELPA, etc.
  ;; some-package
  ;; some-package :location elpa)

  ;; A local package
  ;; (some-package :location local)

  ;; A package recipe
  ;; (some-package :location (recipe
  ;;                         :fetcher github
  ;;                         :repo "some/repo"))
  ;;
  ;; An excluded package
  ;; (some-package :excluded t)
  )
(defun casouri/init-nyan-mode ()
  (use-package nyan-mode)
  :defer
  :config
  (setq nyan-animate-nyancat t)
  (setq nyan-wavy-trail t)
  )

;;; packages.el ends here

Question

Does anyone knows what is the problem? I have searched Google but had no luck.
Thanks.

P.S.: I know I can add the single package to additional package, but I want to put all personal configured package into one layer for easier management.

@d12frosted
Copy link
Collaborator

From what I see, the supported value is elpa, which means that it will install package using package-install from... well, ELPA, MELPA or Org ELPA. It seems that documentation is misleading. You can't pin packages to specific archive an such a way 😿

But there is a good new - #6575 allows it 😸

@casouri
Copy link
Contributor Author

casouri commented Jul 28, 2017

This works! Thanks👍

@casouri casouri closed this as completed Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants