Comments (7)
I did not, though I haven't looked at it in a while. I ended up just working around it by using the normal init directory for emacs
from general.el.
In fact, I can't get any definer to work in any capacity.
This bit of code fails with (invalid-function my-leader-def)
(use-package general
:config
(general-create-definer my-leader-def
:prefix "C-c")
(my-leader-def
"a" 'org-agenda
"b" 'counsel-bookmark
"c" 'org-capture))
from general.el.
I suspect there is a problem with your use-package config or config elsewhere. Can you provide a minimal init reproduction?
from general.el.
I think I may have found the issue. It seems to have something to do with the fact that I am using a default.el
instead of the normal init directory. I also use nix, so that may be a factor.
You might be able to reproduce with the following default.el
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(eval-when-compile (require 'use-package))
(require 'bind-key)
(use-package general
:ensure t
:config
(general-create-definer leader! :prefix "SPC")
(leader! "a" 'org-agenda))
If I start emacs with no config and M-x load-file RET default.el
I can't reproduce this issue. It is only when the default.el is put in the standard search path for libraries in Emacs, see the manual.
If you happen to use nix, my derivation of emacs looks like this:
(pkgs.emacsWithPackagesFromUsePackage
{
package = pkgs.emacsUnstable; #Emacs 29
config = ./default.el;
defaultInitFile= true;
alwaysEnsure = false;
extraEmacsPackages = epkgs: [
epkgs.use-package
];
});
Notably, the :general
use-package statement works fine on its own. I can bind keymaps normally. Only when declaring macros do I have trouble.
from general.el.
I also just stumbled upon this. I can report to have the exact same issue. Is there any solution to it?
from general.el.
If you are using elpaca see #556. Make sure the general-create-definer
/config section is actually running. Really you don't need to put it in the :config section if you're loading general immediately. In any case, I don't think there is any issue with general here
from general.el.
I also have exactly the same issue, and I'm also using emacs-overlay. @IllustratedMan-code Did you figure out a way to fix this issue?
from general.el.
Related Issues (20)
- Prefix is not working with local leader definer HOT 1
- which-key labels not shown in prefix-command keymaps HOT 1
- General.el byte-compile warning HOT 2
- using multi evil states/keymaps in single general-def
- keymaps not activating keymap during major-mode treemacs HOT 2
- `general-def` is not defined when used in `pre-` or `post-command-hook` HOT 1
- general is not working correctly for emacs-lisp-mode HOT 1
- Using general.el with meow HOT 4
- binding "TAB" in company-active-map to company-complete-selection problem HOT 2
- Creating a toggle to activate/deactivate keybindings HOT 3
- Should `.dirs-local.el` be named `.dir-locals.el`? HOT 1
- Support for repeat-map HOT 1
- how can i overwrite keybinds already defined in the create-definer function in specific modes? HOT 1
- [Qustion] How to remap C-j in magit-revision-mode HOT 1
- SPC SPC as a leader key initialization Even in Insert state/mode or the Emacs Input mode. HOT 4
- Macros defined using general-create-definer cannot be used outside of the use-package statement. HOT 10
- Which-key shows wrong labels from inactive keymaps HOT 4
- Allow `general-simulate-key` to select registers HOT 1
- Can't figure out how to combine definers and nested prefixes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from general.el.