Fork me on GitHub
#emacs
<
2019-08-29
>
Lone Ranger00:08:50

anyone have a decent CSS workflow? Just trying to get some basic stuff going like looking up documentation

Lone Ranger00:08:08

ah okay, css-lookup-symbol. apropros is quite handy...

bozhidar05:08:48

Seems there’s not much in that release, though.

bozhidar05:08:11

Emacs 27.1 is where all the action is happening.

tianshu06:08:24

@yenda Yes, I meet the same problem and I'm using vanilla emacs.

yenda08:08:31

Look into #cider channel I found a solution

tianshu08:08:21

on my machine, the clojure-mode is much slower than the emacs-lisp-mode. eventhough cider is not connected

tianshu08:08:39

is there something I can disable to improve the performance?

yuhan09:08:31

do you have aggressive-indent enabled? I've found that slows it down a lot in large forms because of clojure-use-backtracking-indent

tianshu09:08:26

no, I don't have that

tianshu09:08:35

I only have clojure-mode, paredit, cider-mode

yuhan09:08:41

try using the profiler to track it down

tianshu09:08:44

If I hold C-n, in emacs-lisp-mode it's very smooth, but in clojure-mode, it lags after a few lines

yuhan09:08:40

M-x profiler-start, do the laggy thing, profiler-report

tianshu09:08:16

- command-execute                                                3087  96%
 - call-interactively                                            3085  96%
  - funcall-interactively                                        2535  78%
   - next-line                                                   1582  49%
    - line-move                                                  1579  49%
     - line-move-partial                                         1273  39%
      + default-line-height                                        15   0%
      + window-screen-lines                                         9   0%
        window-inside-pixel-edges                                   1   0%
       line-move-visual                                           143   4%
    + called-interactively-p                                        2   0%
   + execute-extended-command                                     621  19%
   + previous-line                                                323  10%
It's very strange that line-move-partial cost 39%, but after expand this I can't find where the 39% gone

tianshu09:08:49

could it related to font-lock stuff?

jahson11:08:03

I recently switched from PragmataPro typeface in Emacs because somehow it was causing slow drawing (?), though I don't found anything in profiler report. The other culprit is often the linum mode.

mpenet11:08:17

if you're on emacs 26+ you can use display-line-numbers-mode instead

mpenet11:08:24

it should be much faster

manandearth08:08:04

Thanks for the tip! This really does make a difference.

jahson11:08:50

I somehow got used to live without the line numbers, since vim. I know how to go to line N and there's almost always a line number in status line.

mpenet11:08:50

Same, but it's a nice to have. I added it to try a few months back and now I quite like it

tianshu11:08:52

interesting, I'm using consolas font, didn't see changes after switch to another. also, I don't open line number, no modeline

tianshu11:08:14

in emacs-lisp-mode, it's always fast. so I'm thinking about font-lock stuff

tianshu11:08:40

it's easy to feel the differences in my case, just write about 50 lines of (def x 10). then you move up and down, compare to (setq x 10) in emacs-lisp-mode.

yuhan11:08:37

you could try toggling font-lock-mode off and see how much difference it makes?

tianshu11:08:35

yes, turn off the font-lock-mode make it fast

tianshu11:08:55

wow! (setq auto-window-vscroll nil) this solve the problem for me

tianshu11:08:06

make it much better

tianshu11:08:52

@qythium thank you very much!

yuhan11:08:14

glad i could help 🙂 I wonder why it's turned on by default for you? it isn't on my side, could be a version/distribution thing (emacs-mac 26.2)

tianshu11:08:41

I'm using emacs 26.2 on linux.

tianshu11:08:59

I don't know why it is turned on and what it does.

Lone Ranger14:08:26

super noob question, how does one invoke this key command? \C-cl

Lone Ranger14:08:41

aha... Ctrl-C then L, got it