Welcome! Please see the About page for a little more info on how this works.

0 votes
in Tools by

Hello,

I'm very new to all of this...

I encountered this error setting up Emacs with the standard configuration:

Warning (evil-collection): `evil-want-keybinding' was set to nil but not before loading evil.

Make sure to set `evil-want-keybinding' to nil before loading evil or evil-collection.

See https://github.com/emacs-evil/evil-collection/issues/60 for more details.

I went to the URL, but can't understand what they're discussing.

How do I fix this?

And what's the ideal setup to get up and running on building solutions in Clojure on a Mac?

3 Answers

+1 vote
by

I encountered this error setting up Emacs with the standard
configuration:

The error you posted comes from an emacs package (evil-collection) which is not part of a standard emacs configuration. I'm assuming you followed a guide or are using an emacs distribution such as Spacemacs or Doom emacs that use the package named "evil" and provide a preconfiguration.

If you're new to both Clojure and emacs I suggest you start from scratch, this way you can remove as many variables as possible (such as the "evil" package above). There's an online book "Clojure for the brave and true" that covers configuring an otherwise standard emacs for Clojure development. https://www.braveclojure.com/basic-emacs/

As a side note, the "evil" package provides modal editing in emacs like what you can find in vi. If this is something you are looking for, after you get your Clojure environment up and running you can go back and configure evil to get both working nicely, or look into one of the distributions mentioned above.

by
I uninstalled and re-installed emacs on my machine. When I re-launched emacs, Spacemacs appeared on the app.

How do I blow out all components and dependencies of my previous installation, so I can truly start from scratch?

(and don't I need to do this anyway before following any of suggestion among all the responses?)
by
You mention you're on a mac. There's actually multiple places where the emacs config can be stored. First close emacs. No need to uninstall it, just close it. Then try the following commands from a terminal (Terminal.app in mac):

- rm -R ~/.emacs
- rm ~/.emacs.el
- rm -R ~/.emacs.d
- rm -R ~/.config/emacs

I'm not a spacemacs user myself so I don't know the specifics of that distribution. A quick search mentions the file `~/.spacemacs` so try deleting it as well:

- rm ~/.spacemacs

Most of the commands above will fail depending on where you are storing your configuration file, but at least one should succeed. After running those commands try launching emacs again, and it should show its default configuration.
by
Yes - those commands worked - thanks.
by
Odd -- I'm following along the braveclojure.com/basicemacs page and my window doesn't appear identical to the web page's Emacs when I do M-x cider-jack-in. My core.clj code and REPL are in a vertical stack, not side by side.

I've tried the other key-binding commands to match the web page, but no luck. What else can I do?
by
As long as you can type code in the REPL and get it evaluated then it shouldn't matter if the window split is vertical or horizontal, that's just how emacs decided to layout its windows. If you want to have them side by side try with "Control-x 0 Control-x 3".

Just to be clear, emacs has nothing to do with Clojure, it just so happens that the Clojure community early on embraced emacs as one of its preferred editors due to its lisp support. There are other editors and IDEs that might feel more familiar to you if you don't want to learn both at the same time and support Clojure via plugins: Visual Studio Code has Calva, IntelliJ has Cursive, etc. I'm not trying to discourage you from learning emacs, it's a fantastic tool if you can invest in learning it, but it can be a daunting task to learn both emacs and Clojure at the same time.
0 votes
by

About the setup, I recommend you taking a look at this Emacs guide: https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/

0 votes
by

How do I fix this?

Depends on how you've installed and setup evil. If you use use-package, this[1] is one way.

[1] https://github.com/AirManH/.emacs.d/commit/6f7e3082a005cee9b413d62ffafb40e3e8ae3ed2

...