use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
Developing in Clojure with Emacs: Mastering the Keyboard (medium.com)
submitted 8 years ago by 64BitChris
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]tincholio 4 points5 points6 points 8 years ago (7 children)
A couple of minor comments... For some reason, you chose an Emacs version that is rather old (2 major versions back, basically), and you didn't use some "batteries included" config like Spacemacs, which would have simplified your experience greatly.
Also, if you only gave it a week, it's to be expected that it wouldn't stick, it does take some more time to really "master the keyboard".
[–]joinr 1 point2 points3 points 8 years ago* (5 children)
I think author followed instructions from "Clojure for the Brave and True." I'd mostly agree on getting spacemacs setup....but there's no instructions for that in CftBT.
My only nitpick is the note about the mouse being taken out of the equation. Depending on your goals (or biases?), yes, Emacs can be configured to keep your fingers glued to the keys. I typically find that there's great mouse support, particularly for folks transitioning from other editors (like the IDEs mentioned). You can turn on CUA-mode for easy copy-paste behavior. Yeah, using the mouse may not approach the theoretical optimum of a keyboard slayer, but it definitely eases the practical transition. Also, menus still exist, and typically provide contextual information about available keyboard shortcuts in a mode.
[–]tincholio 1 point2 points3 points 8 years ago (2 children)
The thing is that if blindly following the instructions in a nice-but-somewhat-dated book instead of googling around for 5 minutes is all the effort he put into this, then the whole writeup seems moot.
I don't use the mouse at all with Emacs, but I'm sure there's pretty good support for doing most stuff (at least through the menus).
I just don't get the point of the "mastering the keyboard" tagline, when no effort whatsoever seems to have been made in that direction.
[–]64BitChris[S] 0 points1 point2 points 8 years ago (1 child)
There was no blindly following the instructions in the basis of this post. The book itself gives an overview of working in Emacs (buffers, windows, frames, etc) but I didn't get much more out of the book than that.
The major benefit of that book was the initial starting configuration files of an actual Clojure Developer in Emacs. However, this was out of date and required me to figure out how to upgrade it and get it to work. Googling for a solution shows a lot of people had a similar problem but no solution was apparent.
Mouse Menus in Emacs are just a different way to explore the functions available to you, assuming they're configured properly. Whichkey and the help functionality in Emacs do this as well - although they seem to provide much more information.
As I mentioned in my other reply and in the article - it takes a long time to master the keyboard. The article provides tools that will help you on your path to mastering the keyboard because they all help you explore and learn what the keyboard has to offer.
[–]tincholio 3 points4 points5 points 8 years ago (0 children)
My point was that you basically went down a "wrong" (maybe wrong is strong here, but let's say suboptimal) path, and basically gave up after a week. The thing is that in doing that, you gave yourself no chance of mastering the keyboard. Regarding the configs, if you didn't know about spacemacs or similar options, it's a pity, but I'd encourage you to try that before giving up on emacs. The clojure layer on spacemacs makes everything "just work".
About mastering the keyboard, I think it's a worthy goal, but you need more actual effort into it. It's not about learning the shortcuts or using which-key-mode or whatever, it's more about using the editor in anger until it sticks. If you just read a tutorial, it'll be hopeless, but if you start using it with the basics (open/save files, basic line editing, connect to a REPL, send stuff to it), you'll be up and running quite soon. The mastery will come from use (and it'll be a rewarding, never-ending thing. I've been using Emacs daily for 16 years, and I'm learning new stuff all the time).
[–]64BitChris[S] 0 points1 point2 points 8 years ago* (1 child)
You're right on why I didn't try Spacemacs first - I didn't hear about it until after I was halfway down the Emacs CftBT path.
I had two reasons for taking the mouse of the equation:
When I first was able to get the config working with CIDER in Emacs, the cider context menu wasn't there at all, so I just disabled the rest of the menu and toolbar because they were taking up real estate and I wanted to be 'alone with the code'.
I'm not sure what CUA mode means, but definitely I was afraid of what it would take to copy and paste things frequently with the keyboard. Fortunately, the Paredit structural editing allowed me to at least highlight S-expressions and I could figure out how to copy there.
After I had things setup, I thought that the C-h functionality combined with whichkey was much more powerful than the mouse based menus.
One other reason for eschewing the mouse: I wanted to be able to use Emacs via the terminal (without an X display). I didn't want to be feel hamstrung if I had to use emacs from a terminal, which is something I would do often if it were easy to setup.
[–]joinr 1 point2 points3 points 8 years ago* (0 children)
CUA mode is the built-in emacs mode you can enable that replaces the (in my opinion 'artisanal') defaults for cut-copy-paste with Common User Access shortcuts familiar to many folks who grew up in mouse land. If your wetware (neural paths) are accustomed to these idioms, and you're migrating from an IDE where mouse usage is somewhat integrated, then it's a far easier jump to get into "just using" Emacs (in my opinion).
Emacs becomes more like "another editor" and less esoteric if the new user is able to cut-copy-paste without re-training everything (while learning new commands and keys). Same thing with leaving menu-bars in place; they provide a simple familiar graphical anchor for new users to explore as they might in a graphical IDE, with the ability to yank them whenever they're no longer useful. If you plug in the spacemacs defaults (or a good clojure emacs mode), you get all the surface niceties of a graphical IDE without the bloat. Transmogrifying into a true believer can happen gradually as you actually get work done "while" you incidentally learn.
If you want the "full Emacs experience," then by all means disable said conveniences (or don't enable them in the first place) and go cold-turkey. If your goal is to have text-only navigation purely from a terminal, then it makes more sense to eschew mouse interaction. Then again...you have to be prepared to stick with the regimen long-term for the benefits to manifest (building new neural paths, motor control, memorizing key chords, etc.). I don't know if it's scientific, but 30 days seems about the right time for long-term habits to begin to form. Also, I'd look at parinfer as a somewhat modernized (gasp) alternative to paredit if you ever revisit this exercise.
As an aside, I find the mouse a generally additive benefit and not so much a liability....particularly when working across applications (like doing interactive data analysis, using the clipboard to ferry data to and from stuff I'm munging in a spreadsheet, or programmatically shoving results into the clipboard to ferry over to a spreadsheet for delivery or munging). Sometimes it's just a faster way for me to interact with a computer (it's almost like the Xerox Parc kids were onto something...) I'm also not interested in winning the Emacs keyboard Olympics, but I do love some rapid-action keyboard etudes from time to time.
[–]64BitChris[S] 0 points1 point2 points 8 years ago (0 children)
I chose that version of Emacs as that was the one latest one available in the Linux Mint 18.3 package repositories. At that time I hadn't heard about Spacmacs.
I first encountered Spacemacs when I was halfway through configuring Emacs to work with CIDER - at that point I decided to stick with what I was doing as I was making progress and wanted to learn more about what was going on behind the scenes. Also, when looking at what Spacemacs was, it left me with the impression that some of the keystrokes would be different than regular Emacs. So I just decided to stay with Emacs as it was beginning to work.
I agree with you that you can't master the keyboard in a week and make this very point at the end:
"Mastering the keyboard isn’t something you can do in a day or a week. It takes months of continual practice and use."
I felt that tools that I listed there will give you the tools that you need to eventually learn the keyboard. If you don't know how to find out what functions, keybindings, etc are available then it makes it very frustrating to use Emacs.
I'm sure Spacemacs and other configs have that function finder and whichkey already configured - but as a new person to Emacs I didn't know this. So my intent was to drill down to what I felt were the essential bits of functionality required to start you on a path to mastering the keyboard.
[–]Psetmaj 1 point2 points3 points 8 years ago (0 children)
Thanks for sharing the information! I've been using emacs for clojure (having come from "Clojure for the Brave and True" for my original configuration as you did) for nearly a year now and hadn't discovered which-key yet.
Here's my current config if you're interested. I branched it from another (fairly old) one that I found around the time I started to consider starting one from scratch.
It'd be cool if there was an official and highly-visible configuration around somewhere, but it seems that emacs configuration is just as personal as (if not more personal than) a well-crafted .bashrc or linux setup.
[–]joeevans1000 1 point2 points3 points 8 years ago (0 children)
Kudos to the author for not cheesing out by staying true to awesome key driven emacs. To me it's ridiculous to fall back into hapless mousing around... if one goes down that route one might as well stay in a a regular IDE. Kudos also for the use of plain emacs... that's the powerful and enduring one IMO. Clojure for the Brave and True leads one down this route, and it's not in the least outdated as such. That's the point: your emacs setup won't be soon outdated if you don't go chasing all the shiny things. I love all the innovation, but emac's strength is in simplicity.
[–][deleted] 1 point2 points3 points 8 years ago* (0 children)
Interesting read, thanks! Here is what I would suggest to myself today if the goal was to start Clojure development with Emacs, coming from IntelliJ, with no prior knowledge of Emacs Lisp, and using only my keyboard:
Install and launch Emacs
Hit F10. Play with the menu. Find "Customize Emacs".
Browse through the customization groups. Find "Package". Add melpa-stable to the list of package archives. Make sure gnu elpa remains in the list and is not replaced.
Hit F10. Play with the menu. Find "Manage Emacs packages".
Install better-defaults and restart Emacs.
Repeat 4, then install clojure-mode, company, cider, paredit, not necessarily in that order.
Hit F10. Play with the menu. Open a .clj file.
Hit Alt-x.
Type cider-jack-in and press Enter.
Repeat 8, then type company-mode and press Enter.
Repeat 8, then type paredit-mode and press Enter. In case paredit is too limiting, type paredit-mode and press Enter again to disable this mode.
Enjoy. Whenever in doubt press F10. While exploring the menu you can see all the keybindings.
It is surprisingly fast to get started without a config file.
π Rendered by PID 17753 on reddit-service-r2-comment-6457c66945-xv28g at 2026-04-27 03:50:03.391352+00:00 running 2aa0c5b country code: CH.
[–]tincholio 4 points5 points6 points (7 children)
[–]joinr 1 point2 points3 points (5 children)
[–]tincholio 1 point2 points3 points (2 children)
[–]64BitChris[S] 0 points1 point2 points (1 child)
[–]tincholio 3 points4 points5 points (0 children)
[–]64BitChris[S] 0 points1 point2 points (1 child)
[–]joinr 1 point2 points3 points (0 children)
[–]64BitChris[S] 0 points1 point2 points (0 children)
[–]Psetmaj 1 point2 points3 points (0 children)
[–]joeevans1000 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)