This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-18
Channels
- # announcements (1)
- # babashka (39)
- # babashka-sci-dev (59)
- # beginners (60)
- # calva (14)
- # circleci (1)
- # clj-kondo (16)
- # clj-on-windows (1)
- # clojure (95)
- # clojure-europe (5)
- # clojure-norway (2)
- # clojurescript (34)
- # conjure (2)
- # core-async (55)
- # datomic (4)
- # emacs (54)
- # holy-lambda (5)
- # hyperfiddle (2)
- # interop (4)
- # lsp (8)
- # malli (3)
- # nrepl (4)
- # off-topic (34)
- # polylith (5)
- # reitit (3)
- # releases (2)
- # shadow-cljs (85)
- # specter (2)
- # testing (8)
- # tools-deps (12)
hello folks, I wanna start learning emacs for Clojure development, where is a good place to starting reading about doing the setup?
after a cursory glance, https://practical.li/spacemacs/ seems to cover the essentials and be relatively up to date
depends where you're coming from but I say just start with vanilla emacs and read the CIDER docs, then see what you don't like and go from there
I like to have a modern setup (cider + lsp), I have years on Vim, currently on years on IntelliJ, but no experience with Emacs (even moving cursor still strange, rsrs)
i never was able to get traction with Emacs until I started again with spacemacs. YMMV
I highly suggest using #doom-emacs , you can enable clojure module + lsp flag and most everything should work OOTB
curious on this one as well
I understand doom to be much less opinionated than spacemacs, like you can break out of it and evolve it to be more customized easily
the benefits of vanilla are that the defaults are so bad it forces you to learn emacs lisp
IMO doom startup speed is insane.. it pre-compiles all packages used by your config and has a great tool to manage upgrades and package updates, also it has support for emacs native-compilation which is something that is really handful
I know spaceemacs supports modules, but it seems to me doom's modules are easier to configure/customize
not sure why spacemacs wouldn't support native-comp, does it only support an old emacs version? native-comp is really nice
in general startup speed is irrelevant because people run emacs as a daemon and then use emacsclient which starts up instantly and doesn't lose state. very handy for programming over SSH from your phone for example.
i always have emacs running, but i do have general performance issues sometimes when using e.g. autocomplete
yeah, I'm one of the people that use that, but at least at Nubank, this is not common as it seems it doesn't work for MacOs (I'm not a mac user)
native-comp and emacs 27+ helps with that for sure @U4YGF4NGM
@UKFSJSM38 I have emacs running as a daemon with native-comp in macOS. I can hit cmd + e and a new emacs frame pops up instantly, ready to go. Let me know if you would like any assistance. That being said, it's way easier to achieve the same in Linux.
Oh, I'd love to understand what are the steps necessary to make that work, know lots of co-workers that would love to have that working
I know there are multiple ways to install emacs on mac, I bet that affects if daemon will work
@UKFSJSM38 when I installed with brew install emacs
it setup the daemon by default here (the output of install talked about it, and how to restart it and etc...)
it did install 28, not sure about the native-comp thing
is there a way to check if its native-comp or not?
hum, interesting, at Nubank mac users install via:
brew install emacs-plus@28 --with-native-comp
I'm currently running this one to see the result
just finished, seems like the daemon is an option here too:
was installed to:
/usr/local/opt/emacs-plus@28
To link the application to default Homebrew App location:
ln -s /usr/local/opt/emacs-plus@28/Emacs.app /Applications
To start d12frosted/emacs-plus/emacs-plus@28 now and restart at login:
brew services start d12frosted/emacs-plus/emacs-plus@28
Or, if you don't want/need a background service you can just run:
emacs
with the brew services
yes, I think this tells if it's native compiled:
M-x
(and (fboundp 'native-comp-available-p)
(native-comp-available-p))
How you do it depends on two things:
1. Whether or not you want native compilation (also known as gcc emacs)
2. Whether your are on an intel mac or not
If you are only interested in running emacs as a daemon but don't need/want gcc emacs, it's just a matter of downloading emacs, say from https://emacsformacosx.com/ and then use macOS launch agent to launch emacs server at startup, here's a nice guide for it: https://briansunter.com/blog/emacs-daemon-macos/ Once you get it running, test that it's working by going to the terminal and executing /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c
it should open up an emacs frame.
With the emacs server started in the background you can then setup something like skhd to use a global keybinding, so that you can invoke a new emacs frame from anywhere.
I'm on a m1 mac, so to get gcc emacs working I used https://github.com/jimeh/build-emacs-for-macos/ and used one of the "known good commits" listed here https://github.com/jimeh/build-emacs-for-macos/issues/6
My version of emacs is reported as 29.0.50.
tks @U02DNF3TW3E, will tell to a coworker to give a try following that and let you know if any issues!
@UKFSJSM38 seems like running brew services start d12frosted/emacs-plus/emacs-plus@28
after installing with brew install emacs-plus@28 --with-native-comp
also works
I tried using the emacs-plus
version in brew to get gcc emacs working in a m1 mac but it wouldn't work. Everything compiles but when loading up emacs it would complain about not being able to use libgccjit. YMMV though.
can you guys tell me the difference between the emacs
and emacs-plus
packages?
there are various ways of packaging emacs and several forks to run on different platforms, using different GUI frameworks
the one i use on macOS is https://github.com/railwaycat/homebrew-emacsmacport
No idea honestly. For the longest time I used to run whatever https://emacsformacosx.com/ had and it was fine. Then I switched to linux and used whatever was in the repo of the distribution that I was using, until finally settled in building my own.
i think main emacs has come a ways in supporting native macOS GUI (cocoa) since i started using it
If you do go for doom (I’m was on spacemacs now on doom), there’s #doom-emacs And @UKFSJSM38’s https://github.com/ericdallo/dotfiles/tree/master/.doom.d.
going with doom-emacs for now 🙂
for anyone taking this tour, I found this awesome playlist on learning for Emacs Doom: https://www.youtube.com/playlist?list=PLhXZp00uXBk4np17N39WvB80zgxlZfVwj
Oh nice @wilkerlucio! I’m relatively new to the cult, so very helpful!
@wilkerlucio the way i did it was https://www.masteringemacs.org/ to understand the basic stuff
Then prelude https://prelude.emacsredux.com/ as it gives a more barbone config than doom
If you want to understand the emacs config, prelude is just simple, doom its way too complex (at least for me) or check https://github.com/lambdaisland/corgi which seems analogous to prelude
thanks @jmayaalv, I'll start with Doom because I wanna fiddle the least with configurations at this point, just wanna get something that works, and after adjusting I may start learning more about how things work
for anyone taking this tour, I found this awesome playlist on learning for Emacs Doom: https://www.youtube.com/playlist?list=PLhXZp00uXBk4np17N39WvB80zgxlZfVwj