Giter VIP home page Giter VIP logo

Comments (7)

IllustratedMan-code avatar IllustratedMan-code commented on August 16, 2024 1

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.

IllustratedMan-code avatar IllustratedMan-code commented on August 16, 2024

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.

noctuid avatar noctuid commented on August 16, 2024

I suspect there is a problem with your use-package config or config elsewhere. Can you provide a minimal init reproduction?

from general.el.

IllustratedMan-code avatar IllustratedMan-code commented on August 16, 2024

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.

Kintaro avatar Kintaro commented on August 16, 2024

I also just stumbled upon this. I can report to have the exact same issue. Is there any solution to it?

from general.el.

noctuid avatar noctuid commented on August 16, 2024

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.

gustavomedeiross avatar gustavomedeiross commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.