I want to try to reorganize my init.el file using use-package. Part of that is setting key bindings in the use package declarations of the packages, for which the key bindings apply.
Currently I have this:
;;; Emacs-Config --- This is my Emacs config file.
;;; Commentary:
;; None.
;;; Code:
;; None.
(require 'package)
;; =====
;; MELPA
;; =====
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(add-to-list 'package-archives '("melpa-stable" . "https://melpa.org/packages/"))
;; ===========
;; USE-PACKAGE
;; ===========
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-when-compile
(require 'use-package))
;; ... many other packages here, all loaded with (use-package PACKAGE_NAME :ensure t) ...
(use-package neotree
:ensure t
:bind (("<f8>" 'neotree-toggle)))
;; ... many other packages here, all loaded with (use-package PACKAGE_NAME :ensure t) ...
This results in:
Error (use-package): Failed to parse package neotree: use-package: neotree wants arguments acceptable to the `bind-keys' macro, or a list of such values
And seemingly no matter what syntax I try to satisfy the bind-keys macro, it shows the same error. So far I have tried:
The question here would be: Where can I find a documentation of how the syntax of key bindings is similar, but not the same, or a note, that it really is the same.
How can I get this key binding to work?
Additional info
GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
use-package version info:
Package use-package is installed.
Status: Installed in ‘use-package-20210207.1926/’ (unsigned). Delete
Version: 20210207.1926
Commit: a7422fb8ab1baee19adb2717b5b47b9c3812a84c
Summary: A configuration macro for simplifying your .emacs
Requires: emacs-24.3, bind-key-2.4
Homepage: https://github.com/jwiegley/use-package
Keywords: dotemacs startup speed config package
Maintainer: John Wiegley <johnw@newartisans.com>
Author: John Wiegley <johnw@newartisans.com>
Other versions: 20210207.1926 (melpa), 20210207.1926 (melpa-stable).
The `use-package' declaration macro allows you to isolate package
configuration in your ".emacs" in a way that is performance-oriented and,
well, just tidy. I created it because I have over 80 packages that I use
in Emacs, and things were getting difficult to manage. Yet with this
utility my total load time is just under 1 second, with no loss of
functionality!
Please see README.md from the same repository for documentation.
Addendum 1
It seems, that :bind also does not accept other key bindings like the following:
(use-package goto-last-change
:ensure t
:bind
(("C-g l" 'goto-last-change)))
Same error:
Error (use-package): Failed to parse package goto-last-change: use-package: goto-last-change wants arguments acceptable to the `bind-keys' macro, or a list of such values
I want to try to reorganize my init.el file using use-package. Part of that is setting key bindings in the use package declarations of the packages, for which the key bindings apply.
Currently I have this:
This results in:
And seemingly no matter what syntax I try to satisfy the bind-keys macro, it shows the same error. So far I have tried:
"<f8>"
"<F8>"
"f8"
"F8"
[f8]
[F8]
To no avail. The readme states:
The question here would be: Where can I find a documentation of how the syntax of key bindings is similar, but not the same, or a note, that it really is the same.
How can I get this key binding to work?
Additional info
GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
use-package
version info:Addendum 1
It seems, that
:bind
also does not accept other key bindings like the following:Same error: