spacemacs

Spacemacs docs: http://develop.spacemacs.org/doc/DOCUMENTATION.html http://develop.spacemacs.org/layers/+lang/clojure/README.html https://practicalli.github.io/spacemacs/
Gleb Posobin 2021-03-11T14:55:06.023700Z

I think SPC h k shows you what is bound to the given key.

grazfather 2021-03-11T15:16:40.024400Z

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

grazfather 2021-03-11T15:16:47.024600Z

I want to basically unmap it entirely

2021-03-11T17:20:31.025700Z

@grazfather Have tried helm-descbinds ? This does seem to show the bindings in the current modes you're in

grazfather 2021-03-11T17:24:30.027100Z

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

2021-03-11T17:28:33.027600Z

wrapping in "" seems to work `"C-n"`

grazfather 2021-03-11T17:41:26.027800Z

Oh, thank you. In fzf I think preceding with a ' works. I had tried that. You have to close the quotes here, too.

Kira McLean 2021-03-11T19:18:31.032300Z

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?

practicalli-john 2021-03-12T09:06:56.038400Z

Explicitly write them elsewhere... Mulog is an excellent logging project https://github.com/BrunoBonacci/mulog

Yehonathan Sharvit 2021-03-12T09:30:11.038700Z

That seems too much of an integration effort.

Yehonathan Sharvit 2021-03-12T09:30:41.038900Z

Isn’t a simple way inside CIDER to avoid printing the log to the REPL buffer?

Yehonathan Sharvit 2021-03-12T09:31:06.039100Z

or at least tell emacs not to do any font locks to the REPL buffer

practicalli-john 2021-03-12T09:50:40.039300Z

Up to you. I wouldn't generate logs if I wasn't going to use them properly

Yehonathan Sharvit 2021-03-12T10:00:10.039500Z

I need the logs on my screen

practicalli-john 2021-03-11T19:23:33.032400Z

There are some general tips and links towards the bottom of this page https://practicalli.github.io/spacemacs/install-spacemacs/troubleshooting.html

Kira McLean 2021-03-11T19:24:38.032600Z

cool, thanks!

grazfather 2021-03-11T19:24:40.032800Z

Less practical, but this might help as well: https://www.murilopereira.com/a-rabbit-hole-full-of-lisp/

Kira McLean 2021-03-11T19:25:35.033100Z

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!

Kira McLean 2021-03-11T19:25:52.033300Z

looks interesting, thank you. I’ll check that out.

grazfather 2021-03-11T19:29:01.033500Z

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 😒

practicalli-john 2021-03-11T19:31:45.033700Z

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.

practicalli-john 2021-03-11T19:33:16.033900Z

Avoid evaluating code directly in the REPL buffer and use source code buffers instead. Avoid writing logs to the REPL buffer.

practicalli-john 2021-03-11T19:34:08.034100Z

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

grazfather 2021-03-11T19:39:05.034300Z

Why would putting a few thousand lines in the repl slow down emacs?

practicalli-john 2021-03-11T19:39:32.034500Z

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)

practicalli-john 2021-03-11T19:41:46.034700Z

@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

practicalli-john 2021-03-11T19:43:08.034900Z

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&lt;= "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&lt;= "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 value

2021-03-11T23:46:19.037900Z

I’ve had spacemacs slowing down when I’ve had large output displayed in the repl. In which case cider-repl-clear-buffer helped.