Closed MarcRohrer closed 8 months ago
Hmmm... I'm not quite sure why the error makes it seem like your binding to the C key instead of C-x (looking at the docs use-package seems to recommend single parens instead of nested parens so perhaps that's why). Regardless this isn't correct usage for binding keymaps. Use-package has a specific section suggesting how to do this. Perhaps I should update the docs to recommend that, in the meantime could you try bind-keymap instead of bind and see if it fixes your issue?
as I said, I changed it to:
(use-package projection
;; Enable the `projection-hook' feature.
:hook (after-init . global-projection-hook-mode)
;; Require projections immediately after project.el.
:config
(with-eval-after-load 'project
(require 'projection))
;; Access pre-configured projection commands from a keybinding of your choice.
;; Run `M-x describe-keymap projection-map` for a list of available commands.
:bind
(("C-x p" . projection-map)))
(use-package projection-multi
;; Allow interactively selecting available compilation targets from the current
;; project type.
:bind
(("C-x P" . projection-multi-compile)))
(use-package projection-multi-embark
:after embark
:after projection-multi
:demand t
;; Add the projection set-command bindings to `compile-multi-embark-command-map'.
:config (projection-multi-embark-setup-command-map))
which works fine. At least for the key-bindings.
The error with projection-map ist something else of course.
Yes, @MarcRohrer you're still using :bind instead of :bind-keymap as use-package recommends. Please see the docs I've linked and confirm if you're seeing a different problem.
:bind sets global keys, that is what I wand and is needed here as of my understanding. projection-map does not work even if I run it with M-x.
Because it's a map. Please properly read the documentation your directed to. :bind-keymap also binds in the global map, but it works around the fact you can't autoload keymaps.
Not better after :bind-keymap. I have no time to investigate into this any further. Sorry
Hi,
I just wanted to try out your package, I just copied your suggested init and get:
I then changed the key bindings to:
and
which works, but calling the projection-map function results in:
Marc