I think SPC h k
shows you what is bound to the given key.
SPC h d k does, but it’s still a bunch of chasing since you have to unmap that key, restart, then see what’s ‘next in line’, or mapped behind it
I want to basically unmap it entirely
@grazfather Have tried helm-descbinds
? This does seem to show the bindings in the current modes you're in
Oh, no, thank you, that’s very helpful @shan. Slightly on topic: HOw can I get helm to match literally? if I type c-n
it matches thinks like SPc C-v n
wrapping in "" seems to work `"C-n"`
Oh, thank you. In fzf I think preceding with a '
works. I had tried that. You have to close the quotes here, too.
Hello! Sometimes with spacemacs my repl slows waaaayyyyy down.. like taking minutes to figure out (+ 1 1)
. I suspect my spacemacs config because I don’t seem to have the same issue with a fresh spacemacs setup. I’m wondering if anyone has tips for debugging. I don’t really know where to start looking for the problem other than brute force.. just deleting half my config at a time.. are there any tools available to try to narrow down what might be causing the extreme slowness?
Explicitly write them elsewhere... Mulog is an excellent logging project https://github.com/BrunoBonacci/mulog
That seems too much of an integration effort.
Isn’t a simple way inside CIDER to avoid printing the log to the REPL buffer?
or at least tell emacs not to do any font locks to the REPL buffer
Up to you. I wouldn't generate logs if I wasn't going to use them properly
I need the logs on my screen
There are some general tips and links towards the bottom of this page https://practicalli.github.io/spacemacs/install-spacemacs/troubleshooting.html
cool, thanks!
Less practical, but this might help as well: https://www.murilopereira.com/a-rabbit-hole-full-of-lisp/
so far I’ve just been restarting everything when it happens and hoping it doesn’t happen again :face_palm: of course it always does. I really do want to get to the bottom of it but also I’d rather be writing code!
looks interesting, thank you. I’ll check that out.
Funny story: I went to test out SPC a p
from practicalli’s link and I noticed that my Emacs was in a hard hang 😒
If the repl buffer is getting quite large, try setting a size limit in .spacemacs layer configuration
(clojure :variables
cider-repl-buffer-size-limit 100)
100 is quite an extreme number, try 1000 if you want to see some history.Avoid evaluating code directly in the REPL buffer and use source code buffers instead. Avoid writing logs to the REPL buffer.
Use cider-inspect to view any data more than 100 characters. Its an amazing tool and you can page through large data sets or deeply nested data without killing Emacs https://practicalli.github.io/spacemacs/evaluating-clojure/inspect.html
Why would putting a few thousand lines in the repl slow down emacs?
Other general steps you could try:
• close any really big files
• remove any layers you are not using
• run Spacemacs develop
branch
• use SPC f e D
to check nothing is missing from your .spacemacs configuration
• run Emacs 26.3 or 27.x (if on a Mac, try a few different builds of Emacs)
• try delete .emacs.d/elpa
packages content and restart spacemacs to download and compile packages
• avoid using lots of layouts / workspaces (although this only seems to affect startup time)
@grazfather you can slow down Emacs with a single line if its long enough and Emacs is trying to font lock it... and the default bi-directional processing is enabled in Emacs. font locking is very expensive in relative processing terms in emacs
That reminds me of some other general optomisations that can be made to emacs, assuming you use left-to-right languages
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Emacs text rendering optimizations
;; <https://200ok.ch/posts/2020-09-29_comprehensive_guide_on_handling_long_lines_in_emacs.html>
;; Only render text left to right
(setq-default bidi-paragraph-direction 'left-to-right)
;; Disable Bidirectional Parentheses Algorithm
(if (version<= "27.1" emacs-version)
(setq bidi-inhibit-bpa t))
;; Files with known long lines
;; SPC f l to open files literally to disable most text processing
;; So long mode when Emacs thinks a file would affect performance
(if (version<= "27.1" emacs-version)
(global-so-long-mode 1))
;; End of: Emacs text rendering optimizations
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
I assume this can be changed for right to left by changing the valueI’ve had spacemacs slowing down when I’ve had large output displayed in the repl. In which case cider-repl-clear-buffer helped.