Fork me on GitHub
#emacs
<
2023-02-04
>
seancorfield23:02:16

Hi folks, I'm trying to overhaul http://clojure-doc.org this year and I want to get a sense of how valid/outdated this section is: https://clojure-doc.org/articles/tutorials/emacs/ -- Is there an up-to-date, preferred guide that I should be linking to instead? Also, are there other popular Emacs setups that http://clojure-doc.org should either try to cover or just link to? Thanks!

jasonjckn01:02:00

This seems way out of date, “ brew cask” is deprecated syntax i believe , a lot of people using brew taps to install emacs but there’s a variety of them the most popular emacs config layers are doom and spacemacs i thought practicalli had some good guides (?) i don’t know of any myself but never looked A section on installing emacs via Nix i wouldn’t argue against

seancorfield01:02:07

I suspected as much. My exposure to Emacs is all historical at this point (I used it from the 17.x to 19.x days, and then again for a while in my early Clojure days a decade ago). I'll probably remove that page and just have an Editors page with links to the stuff on http://clojure.org and the stuff on http://Practical.li and folks can send PRs against that to add more links...

AC01:02:45

At the very least, emacs-28 is the latest and greatest. There are many paths if you have never used emacs before and those are probably best served by external links to other sites. Some people will want a batteries-included install (doom, spacemacs) and others will want something DYI. For current emacs users, it's probably fine to point them to the clojure-mode, cider, clj-refactor, clojure-lsp, paredit/lispy/smartparens packages.

seancorfield01:02:52

In other words, point them at this basically: https://clojure.org/guides/editors#_emacs_most_popular_most_customizable -- since that links to (nearly) all of that other stuff... although, ironically, it points to the http://clojure-doc.org guide 😐

👍 2
jasonjckn02:02:07

ya, if you’ve not used emacs before nobody reading that guide should be learning clojure as well as emacs for the first time simultaneously

jasonjckn02:02:23

and if you already know emacs, you probably don’t care for a guide

seancorfield02:02:15

Haha... yeah... I remember all the experimentation I used to do with my Emacs setups over the years... very little of it would have been helped by a guide...

💯 4
mpenet07:02:17

clojure-mode is kind of an implementation detail. I would just mention cider and the 2 main clojure-lsp modes (lsp-mode and eglot (the later being a built'in)). Both cider and these modes have decent doc already.

mpenet07:02:59

and not mention doom & co, if you are a emacs user you already have a conf/setup, you don't care about distrib specific details

elken08:02:53

I would disagree there, this is the perspective for installing emacs so no you likely won't. Mentioning Doom & Spacemacs and how trivial it is to get a very powerful clojure setup is very valuable for newcomers

practicalli-johnny10:02:11

I wouldn't be using Emacs for Clojure development without one of these community configurations (Spacemacs, Doom, Prelude). Thanks to everyone that contributes and maintains them.

❤️ 4
4
seancorfield17:02:12

@U050SC7SV Adding clojure-lsp is probably a good idea. Thank you. Much of the base assumption of clojure-doc is that you (the reader) are new to all this and may well not have Emacs installed or may only have a basic install without a suitable configuration for Cojure.

seancorfield17:02:59

@U050SC7SV The LSP docs -- https://clojure-lsp.io/clients/#emacs -- refer to lsp-mode rather than eglot. I think my team mate uses the latter but I thought there were some integration issues with it? Have those been solved? (I'll ask in #lsp as well)

elken17:02:28

Last I checked it runs ootb, the former is more feature rich than the latter

elken17:02:09

https://github.com/joaotavora/eglot/blob/master/eglot.el#L231-L232 yup assuming clojure-mode is installed M-x eglot should work fine

seancorfield17:02:31

@U043RSZ25HQ Is eglot built into Emacs? The docs on that repo suggest you need to install it as a package? (@U050SC7SV mentioned eglot was built-in above)

elken17:02:44

29 onwards

2
elken17:02:44

It's also available on ELPA for older versions 🙂 https://elpa.gnu.org/packages/eglot.html

2
seancorfield20:02:31

How does this work for emacs folks? https://clojure-doc.org/articles/tutorials/editors/ I'm mostly deferring to the project docs, http://clojure.org's editors page, and http://Practical.li but wanted to provide a basic list of options and jumping off points.

👍 2
mpenet20:02:44

Looking good. I think lsp-mode deserves a mention tho. While eglot is becoming a default lsp-mode is still extremely popular

👍 2
elken20:02:46

LGTM! 🙂

seancorfield20:02:11

@U050SC7SV The link to clojure-lsp is https://clojure-lsp.io/clients/#emacs which talks about lsp-mode

practicalli-johnny20:02:48

Minor point, could we use "Emacs is the longest serving and most customizable editor" rather than "oldest"?

2
seancorfield20:02:08

Emacs is older than most of us 🙂

mpenet20:02:09

Or just « the bestest » :)

😉 2
seancorfield20:02:13

(but, yes, updated)

practicalli-johnny01:02:03

Thanks for the update Sean. I had a look at how young Gnu Emacs is compared to myself... On it's first release I was in secondary school (high school) and hacking on an Atari 8-bit computer 😂 I'm even more long serving than the original Editor MACroS, although I didn't know what a computer was... I had just got my first bike (with stabilisers)

2
seancorfield02:02:22

Like you, when Emacs first appeared, I was already programming in high school -- I had a Sinclair Programmable calculator and my school did a correspondence course with a local technical college where we learned Algol 60 as an elective! I started using GNU Emacs in the mid-'80s in one of my first jobs. I continued with it on and off into the mid-'90s before moving on to IDEs (such as TogetherSoft's "Control Center" which had round-trip editing between UML diagrams and C++ as I recall, and later between UML and Java as Together/J which Borland then bought). When I started learning Clojure over a decade ago, I decided to give Emacs another try since it was so popular in the Clojure community... and I was shocked at how little it had changed since the mid-'90s! 🙂 🙂

👍 4
AC03:02:38

While there is some beauty in how consistent (and reliable!) emacs has been since the 90s (when I first used it), I'm amazed at how fast things are moving in the last few releases. Tree-sitter integration in 29 is going to bring the power of structured-editing to non-lisp languages (on top of faster font-locking, etc)

👍 2
jasonjckn03:02:25

@U0124C56J5R clojure ts mode needs more volunteers if you’re interested

mpenet06:02:21

Emacs (core) evolved a lot, especially the last few years. Not to mention the non stop flow of quality packages/modes.

👍 2