I have this in my personal spacemacs layer's packages.el
:
(setq mylayer-packages
'(general
(mylayer :location local)
evil-org
))
Then later in the same file:
(defun mylayer/post-init-evil-org ()
(spacemacs/set-leader-keys-for-minor-mode 'evil-org-mode
"ot" 'counsel-org-tag
)
(general-define-key
:states
'(normal)
:keymaps 'evil-org-mode-map
"O" 'mylayer/either-O-or-org-open-above
"o" 'mylayer/either-o-or-insert-heading-respect-content
)
)
When I start spacemacs (conventionallly configured: ~/.emacs.d
is a symlink to my spacemacs git repo), I get this:
An error occurred while post-configuring evil-org in layer mylayer (error: (void-function general-define-key))
general-autoloads.el is there in the package directory as I expected:
spacemacs/elpa/25.1/general-20171106.818/general-autoloads.el
I expected that emacs would have read that autoload file at startup before my layer's post-init function for evil-org was read, and that I would therefore be able to call general-define-key
.
What's going on, and how can I avoid the error?