Open amano-kenji opened 1 year ago
Well yes, this is to be expected: there is no such thing as flycheck-package-mode
!
Perhaps you have an autoload which refers to this non-existent mode?
(use-package flycheck-package
:config
(eval-after-load 'flycheck
'(flycheck-package-setup))
:hook (emacs-lisp-mode . #'flycheck-mode))
This is everything I have regarding flycheck-package.
But clearly somewhere in your config or packages is a reference to flycheck-package-mode
. Perhaps you referenced it in a previous version of your use-package
form, and haven't restarted Emacs since?
I deleted ~/.emacs.d
and restarted emacs. I see the same error again.
If I just put (use-package flycheck-package)
in ~/.emacs.el
and manually execute
M-x flycheck-mode RET
M-x flycheck-package-setup RET
in an emacs lisp package. I don't see any error message.
Replacing
(use-package flycheck-package
:config
(eval-after-load 'flycheck
'(flycheck-package-setup))
:hook (emacs-lisp-mode . #'flycheck-mode))
with
(use-package flycheck-package
:hook ((emacs-lisp-mode . (lambda ()
(flycheck-mode)
(flycheck-package-setup)))))
eliminates the error. What went wrong? I have to admit that I don't know much about emacs lisp.
With
(use-package flycheck-package
:hook ((emacs-lisp-mode . (lambda ()
(flycheck-mode)
(flycheck-package-setup)))))
I see
The first line should be of the form: ";;; package --- Summary"
You should have a section marked ";;; Commentary:"
You should have a section marked ";;; Code:"
in ~/.emacs.el
, but ~/.emacs.el
is not a package.
What went wrong?
No idea, sorry. The first version of your config snippet is actually more correct, because flycheck-package-setup
should be called once, not every time you enter emacs-lisp-mode
.
The first line should be of the form: ";;; package --- Summary" You should have a section marked ";;; Commentary:" You should have a section marked ";;; Code:"
Are you using an old version of package-lint
perhaps? The wording of these messages are different these days. Perhaps you can share the versions of your emacs and the flycheck
, package-lint
and flycheck-package
packages?
but ~/.emacs.el is not a package.
Perhaps you have a Package-Version
, Version
or Package-Requires
header there? If so, that's taken as an indication that you intend the code to be a package. (This changed at some point, so again, package versions are relevant here.)
(use-package flycheck-package
:config
(eval-after-load 'flycheck
'(flycheck-package-setup))
:hook (emacs-lisp-mode . flycheck-mode))
instead of
(use-package flycheck-package
:config
(eval-after-load 'flycheck
'(flycheck-package-setup))
:hook (emacs-lisp-mode . #'flycheck-mode))
also fixed the error. But, I still see
The first line should be of the form: ";;; package --- Summary" You should have a section marked ";;; Commentary:" You should have a section marked ";;; Code:"
in ~/.emacs.el
which is a symlink to a file outside home directory.
Perhaps you have a Package-Version, Version or Package-Requires header there?
No, I don't have anything like that in ~/.emacs.el
.
Perhaps you can share the versions of your emacs and the flycheck, package-lint and flycheck-package packages?
If I execute
M-x flycheck-mode RET
in an emacs lisp buffer, I see this error message.flycheck-package configuration