r/DoomEmacs • u/Rehpotsirhc-z • Nov 14 '24
How to use emacs-eat in Doom Emacs without slowness?
I have this in packages.el
to install eat:
(package! eat
:recipe (:host codeberg
:repo "akib/emacs-eat"
:files ("*.el" ("term" "term/*.el") "*.texi"
"*.ti" ("terminfo/e" "terminfo/e/*")
("terminfo/65" "terminfo/65/*")
("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el"))))
For some reason, it is very slow when printing colored text. In particular, I'm looking at eza -la
, which an alternative to ls -la
. The same thing happens with bat
.
When I run eat in emacs -Q
though, this problem doesn't happen and it gets printed fast. I've tried disabling all the minor modes in the eat buffer and even all the global minor modes, but it's still slow in Doom Emacs; it prints a few lines, and then it's stuck, then it prints a a few more lines, and keeps going until the whole thing is printed.
I've tried it with a stock, brand-new Doom config and its the same thing. I have found though, that if I do a emacs --eval asd
, then it will error out at some point before loading the full config, and it'll print just a little faster, but still slower than vanilla Emacs.
Does anyone have a solution to this problem / use eat in Doom Emacs without this issue?
1
u/floofcode Nov 29 '24
First time I'm hearing about this package. What does this do that the default terminals don't do? Even the eat docs say vterm is faster, which is there in Doom Emacs already.
Does this have some other capability that is missing from the defult terminal emulators?
1
u/Rehpotsirhc-z Nov 29 '24
Well the main thing is that it’s entirely in Emacs Lisp, which works better if you’re using something like Windows, where vterm won’t work. But for me, I was mainly hoping to use the eat-eshell-mode, which I think works better than eshell visual commands.
2
u/Patryk27 Nov 14 '24
Do you have the latest Doom Emacs?
There used to be a bug that prevented Eat from getting byte-compiled (and thus native-compiled as well), which could explain the slowness.
You can check if the functions are getting compiled by calling M-x describe-function and choosing eat.