Straight.el: Error with introduced use-package keywords

Created on 18 Dec 2017  路  3Comments  路  Source: raxod502/straight.el

With this init.el:

(setq straight-use-package-by-default t)

;; Load straight.el
(let ((bootstrap-file (concat user-emacs-directory "straight/bootstrap.el"))
      (bootstrap-version 2))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
         'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

(setq use-package-verbose t
      use-package-always-ensure t)

(straight-use-package 'use-package)

(use-package general)

(use-package outshine
  :general
  (general-nvmap "go" #'outshine-cycle-buffer))

I get the error Error (use-package): Failed to parse package outshine: use-package: Unrecognized keyword: :general. This is with Emacs 25.3.1 on a Mac.

If I replace straight.el with the appropriate package.el commands, it works. What am I doing wrong?

Thanks for the very cool software! I'm excited to use it!

external bug

Most helpful comment

I came across the same problem, found discussion here: https://github.com/noctuid/general.el/issues/91

So adding the spurious (require 'use-package) call before any other use-package declarations works as a bandaid.

All 3 comments

I came across the same problem, found discussion here: https://github.com/noctuid/general.el/issues/91

So adding the spurious (require 'use-package) call before any other use-package declarations works as a bandaid.

  1. It is almost certainly an error to set both straight-use-package-by-default and use-package-always-ensure to non-nil values.
  2. This is a bug in general. This line in general.el should read (with-eval-after-load 'use-package-core instead of (with-eval-after-load 'use-package. Alternatively, you can require use-package in your init-file in order to trigger the hook, as @sooheon pointed out.

Re: 1 -- ha! Oops! Thanks very much for the help. This is great stuff!

Was this page helpful?
0 / 5 - 0 ratings