This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-03
Channels
- # announcements (55)
- # babashka (14)
- # beginners (49)
- # biff (9)
- # calva (73)
- # cider (14)
- # clerk (8)
- # clj-kondo (6)
- # clojure (92)
- # clojure-dev (4)
- # clojure-europe (18)
- # clojure-norway (62)
- # clojure-uk (5)
- # clojuredesign-podcast (4)
- # clojurescript (34)
- # cursive (40)
- # data-science (4)
- # datomic (5)
- # dev-tooling (1)
- # eastwood (6)
- # emacs (107)
- # figwheel-main (9)
- # fulcro (13)
- # gratitude (9)
- # hyperfiddle (5)
- # introduce-yourself (2)
- # off-topic (45)
- # overtone (23)
- # portal (5)
- # releases (3)
- # shadow-cljs (6)
- # specter (1)
- # squint (32)
- # timbre (4)
- # vscode (2)
I upgraded to emacs 29.1 (from 28.something) and my cursor is moving a lot slower through a clojure-mode buffer. I got rid of lsp from my config but that wasn't it. Any clues? Other modes seem to work fine (JS for example)
check the *nrepl-messages*
log in case something went horribly wrong (wouldn't expect so, but still)
I'm bumping my emacs to latest right now, I can say if I face the same, but since I use linux there is a chance to behave differently
I guess I'll have to re-compile my elpa stuff since I'm getting messages about defvar-1
is missing
1. Native compilation might be in progress (if you have it enabled). But I guess you already waited long enough for it to complete.
2. Try M-x profiler-start
, move your cursor a bit and then do M-x profiler-report
. Might discover something.
This namespace for example: https://github.com/babashka/cli/blob/main/test/babashka/cli_test.cljc
Just kidding. Yeah, smex in the profiler output often means that doing M-x
dominated the profile.
I had the gc threshold at gc-cons-threshold (* 100 1024 1024)
but I deleted that and restarted, same problem
This is kind of crazy, when I half the screen with c-x 2, the cursor becomes fast again
There are sometimes some weird performance issues that happen when upgrading Emacs. I would recommend wiping all elc files (which I think you already did) and try out native compilation if you haven't yet. Maybe it solves the issue
are those emacsen https://emacsformacosx.com/ builds? Those are a vanilla as they can get afaict. Sometimes brew builds add more flags (disclosure: I happily use Emacs 27 so any 28/29 intricacies are mostly out of my knowledge area)
I'll stick to 28.4 then, I was trying to get around issue with lsp-mode by upgrading, but rabbit hole
I use brew install emacs-mac --with-native-compilation
, haven't faced slowdowns so far
The last measure I'd try would be to go back a few clojure-mode releases (hard with melpa but easy w/ git)
neh, wasn't it. I copy pasted 5.16 from github releases, removed .elc and restarted, same problem
I'll try alex's native compilation from brew suggestion and else I'll just stick to 28.4
hard to tell with the forthcoming treesitter support https://github.com/clojure-emacs/cider/pull/3461 I wouldn't be too concerned (we don't advise trying it yet, even without cider)
due to the screen capture rate you might not see the cursor on every line in the fast one, it's too fast
@U06PNK4HG how do you start it?
Is native compilation enabled? maybe it's running in the background? You can check buffer *Async-native-compile-log*
Ah, could be related to osx guardrails and all that. Try navigating to the brew directory in Finder and running Emacs by right-click->Open
It's weird that it doesn't say anything. I occsaionally get Emacs crashes, and even at startup, but it at least produces OSX error/warning dialog
Should I try to install as a cask?
Warning: Treating emacs-mac as a formula. For the cask, use railwaycat/emacsmacport/emacs-mac
(setopt bidi-inhibit-bpa t)
(setopt bidi-paragraph-direction 'left-to-right)
another micro-optimization 馃檪great this works... now the one problem I have with this railway is that it changed the default font to Monaco...
brew install emacs-plus@29 --head --with-mailutils --with-xwidgets --with-no-frame-refocus --with-native-comp
That build of emacs also swaps some buttons, you may want to look at this form to restore it https://github.com/alexander-yakushev/.emacs.d/blob/master/init.el#L1
Or is it all macos emacsen that do that? I don't remember. Anyway, i have that in my init.el
surprisingly just moving http://Emacs.app to /Applications worked ;)
No, I don't, but what I meant, moving the http://Emacs.app file didn't complain about being moved to a different location, I expected it to reference some brew installed files perhaps
It worked before I did that, this just helps me launching Emacs from spotlight etc
I launch emacs from the terminal with 'open' because I want it to inherit my bash profile env
Open the prev and next line calls. Smex shows up because it is reading from mini buff
Has anyone gone full treesitter mode? What are the main selling points for Clojurists? Does it improve the performance with large clojure maps? Sometimes when I open a big edn file and start collapsing sections with evil-fold, things get very sluggish. I wonder if treesitter improves that.
@UDVJE9RE3 (https://github.com/clojure-emacs/clojure-ts-mode) would know best I'd assume that eventually there would be a big advantage yes, just like for any other major mode which parsing had been traditionally been defined with bare regexes
btw, you may be well aware of this, but something like the cider Inspector is a powerful and focused way of dealing with big chunks of data. What if we had a new command, cider-inspect-buffer? It would make sense, most of all, for .edn buffers. If its contents were slurped with a nice reader (tools.reader probably), each element would have line/col metadata so it would be easy to go back and edit stuff. Probably 馃槃
The inspector is nice, but I've never found it to be as fast for weakly structured searching (with surrounding context) of a big EDN file as consult
or other text-based editor search features
The inspector works best when I "know what I'm looking for", but frequently I don't! And that's where an ordinary emacs buffer with fast line search shines
I recently added cider-inspector-previous-sibling
/ cider-inspector-next-sibling
(https://docs.cider.mx/cider/debugging/inspector.html#usage) solving part of that problem.
But yeah something like a true free-form search is not available (although it's reasonably doable)
I am very new to Clojure and programming in general, Jackson from the clojure-ts-mode project put together a Emacs configuration for me that uses it and it works well for the most part
I use the tree-sitter mode full time at work. I've recently shifted focus from a clojure application to a javascript application (booooo) but I've found clojure-ts-mode works well for me. For cider I've been using a fork.
Yeah config is public, I can post
My cider fork I use has an open PR: https://github.com/clojure-emacs/cider/pull/3461 My actual config: https://git.sr.ht/~dannyfreeman/emacs-config/tree the clojure bits: https://git.sr.ht/~dannyfreeman/emacs-config/tree/main/item/modules/df-prog-clojure.el
> What are the main selling points for Clojurists? Does it improve the performance with large clojure maps? For this question: I don't work with large clojure files anymore thankfully. Most files are less than 1k lines of code. I have heard reports from users that they switched over to clojure-ts-mode because it performs better than clojure-mode on large files, particularly with regard to font-locking
One advantage that treesit based modes in emacs have is the ability to set treesit-font-lock-level
and control how detailed the syntax highlighting is. If a file is too big you can lower the number and hopefully improve performance.
Otherwise, clojure-ts-mode tries to be mostly like clojure-mode in the features it implements.