Comments (10)
So I tried to remove all after's and using only major-mode-hydra
but it still doesn't work. To ensure I've got a clean state, I've uninstalled and reinstalled all of my packages but to no avail.
major-mode-hydra
is the 2nd package in my init.el, the first being elpaca
I've found a solution with
;; hydra
(use-package major-mode-hydra)
(elpaca-wait)
By placing an elpaca wait after I think it prevents elpaca from loading the rest of the file. But I thought it was use-package who was in charge of parsing this init file. I will ask them what the hell is going on
from major-mode-hydra.el.
What version of Emacs and use-package
are you using?
from major-mode-hydra.el.
I'm using
GNU Emacs 29.1.50
Development version 45cc57ac2586 on emacs-29 branch; build date 2023-08-21.
And I just realized that I didn't took a tag while compiling it myself. Shall I switch to stable commit and retry my setup to see if it's fixed?
And use-package is at 2.4.5
from major-mode-hydra.el.
Just switched to a stable emacs 29.1 version
GNU Emacs 29.1
Development version a9b28224af0f on HEAD branch; build date 2023-10-04.
Same version of use-package and bug still here
from major-mode-hydra.el.
Don't you need to load hydra by demand as well?
(use-package hydra :demand)
Otherwise pretty-hydra will never load
from major-mode-hydra.el.
It doesn't work too :/ I'm a bit at a loss here with use-package beahviour.
from major-mode-hydra.el.
What is the full use-package expression that you use that gives this error?
from major-mode-hydra.el.
This one
(use-package org-roam
:after (pretty-hydra)
:bind (("C-c n" . roam-hydra/body))
:pretty-hydra (roam-hydra (:color teal :quit-key "q")
("Roam"
(
("l" org-roam-buffer-toggle)
("f" org-roam-node-find)
("i" org-roam-node-insert)
("c" org-roam-capture)
("t" org-roam-tag-add)
)
"Dailies"
(
("j" org-roam-dailies-capture-today)
("k" org-roam-dailies-capture-tomorrow)
("h" org-roam-dailies-goto-yesterday)
("a" org-roam-dailies-goto-today)
("d" org-roam-dailies-goto-tomorrow)
))
))
from major-mode-hydra.el.
Without actually testing it, I wonder if it's the :after
that's causing the issue for you. I'm using the same version of emacs and use-package 2.4.4 and it works fine for me.
To use :pretty-hydra
, you need it loaded before any use-package
with :pretty-hydra
is called. In my config I have this loaded very early. I don't have a separate use-package
for hydra
and pretty-hydra
as major-mode-hydra
loads them all.
(use-package major-mode-hydra
:straight t
:demand t
:bind
(("C-M-SPC" . major-mode-hydra))
:config
(progn
(setq major-mode-hydra-invisible-quit-key "q")
(defun jp-major-mode-hydra-title-generator (_)
`(with-mode-icon major-mode
(propertize (s-concat (format-mode-line mode-name) " Commands")
'face '(:weight bold :height 1.1))
1.1))
(setq major-mode-hydra-title-generator #'jp-major-mode-hydra-title-generator)))
Try removing the :after (hydra)
and make sure it's loaded before other use-package
calls.
from major-mode-hydra.el.
elpaca messes around with loading things by loading asyncronouslly.
As use-package and the :pretty-hydra are in a macro you need all of those bits loaded before using them.
So you need loading of use-package (well not since 29.1 as now in emacs) and loading pretty-hydra and hydra before an elpaca-wait. Then after the elpaca-wait you can use your code
I found elpaca requires too much changing and reordering of code to easily switch to - straight.el and package.el just required a few lines except for non standard packages.
from major-mode-hydra.el.
Related Issues (20)
- Pretty hydras not getting a big enough posframe HOT 4
- How to implement inheritance and mixing? HOT 2
- Hydras and global key bindings HOT 4
- Dynamic Title with pretty hydra HOT 2
- Calling a pretty hydra gives "wrong type argument" error HOT 3
- pretty-hydra: The caret character "^" is not displayed properly HOT 3
- major-mode-hydra: Unrecognized keyword mode-hydra in use-package HOT 3
- missing one line with posframe HOT 4
- Differences between hydra and pretty-hydra? HOT 2
- pretty-hydra: columns cannot left-justified, how to solve it? HOT 7
- macro argument HOT 3
- Composing hydras / minor mode support again HOT 4
- Checking duplicate letter HOT 3
- how to add a head but hide it from the actual menu HOT 2
- What is with-faicon? HOT 2
- Multibyte characters will be displayed incorrectly. HOT 5
- Add customizable title formatter
- Hide menu? HOT 1
- Hydra Generator Helper Function
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 major-mode-hydra.el.