reddit / emacs

Problem with control mode and autoloaded packages from use-package.

Xeroth95 · 2022-11-24 19:27
If I have a package like so: (use-package xyz :bind-keymap ("C-c x" . some-map)) and i enter control mode and press "c x" i would expect it to allow me to enter sequences from some-map as if i pressed "C-c x". Instead it errors out and tells me that c is not a valid prefix. If I force load the package by manually pressing "C-c x" then control mode finds the binding and it works until i close emacs. Is it possible to make it so that control mode understands the binding without first pressing "C-c x" ?
olikn · 2022-11-25 09:13
Info page about use-package: You can override package deferral with the ‘`:demand`’ keyword. Thus,even if you use ‘:bind’, using ‘:demand’ will force loading to occurimmediately and not establish an autoload for the bound key.
Xeroth95 · 2022-11-28 02:05
Sorry for the late reply. I should have mentioned it in my post but demand does not fix this as i already use demand in those packages.