Live data from Hacker News

Ask HN: Resources to grok Emacs and use it well?

news.ycombinator.com

131–140 of 179 posts

Re: Ask HN: Resources to grok Emacs and use it well?

#131
post #6
post #3

If you're currently a vi user, I'd recommend spacemacs ( https://www.spacemacs.org/ ) to soften the learning curve. It comes batteries included (as opposed to a stock emacs install which requires a _lot_ of customization) and uses evil mode (vi keybindings) by default. You can expose yourself to more and more of the emacs way slowly. Also emacs is largely self-documenting. Learn the keys for querying documentation fi…

Spacemacs is great, albeit slow at times. On the evil front there is also Doom Emacs ( https://github.com/hlissner/doom-emacs ) which is better optimized and is still pretty full-featured.

Doom Emacs is a collection of many recommendated packages. For someone doesn't use evil much like me, I can turn it off in the config file. Using Doom Emacs is highly recommended for new comers to Emacs

Re: Ask HN: Resources to grok Emacs and use it well?

#132
You cannot grok it without first trying to live inside it.

It can be treated as an editor, and as your workflow slowly adjusts you will find yourself writing a mental wishlist.

Realising that wishlist is where Emacs shines among other editors/IDEs/applications.

It is a headspace/workspace and imo the programming equivalent of BASB.

I for example use it because I want nothing to pull me from my workflow, so I have shells, repls, notebooks, filesystem browser, internet browser, rss, and a slew of other utilities tiled, something akin to a Bloomberg terminal, even spotify if I need music. It has enabled my productivity in a way no other application could.

Re: Ask HN: Resources to grok Emacs and use it well?

#133

Earlier quoted context omitted.

You can also just run evil mode for the vi emulation (its what spacemacs does), spacemacs is the best emacs IDE though IMHO.

My experience with Spacemacs was the complete opposite. There's a ton of inconsistency with the quality of the provided layers which is why YMMV when using it. The C++ layers up till last year was an utter disaster and I don't know if it's been fixed since. The WORST thing about spacemacs though is their absolutely broken release process. The master branch rarely upgrades with fixes applied to the develop branch, and…

I run the develop branch and I can't really remember any significant bugs I've had.

I can kinda agree the C++ layer was definitely a bit of a pain, but I had general pain setting up a good workflow for C++ in emacs with the project I was working on (most of the emacs packages assumed a different layout, so couldn't understand my CMakeLists to generate the files it would need to look at for smart completion).

Overall, I quite like spacemacs, I used to hack on it a bit to make it suit my needs better, but now I rarely have anything I need to do it "just works" now.

I particularly appreciate that almost any language I want to use, I can just download a layer (I think it often prompts you to install one when you open the file automatically!) and a lot of the common across languages editor functions you want have similar keybindings, and the `which-key` popup will tell you anything you're missing. It makes a very short ramp up to being productive in your editor for a new language.

Re: Ask HN: Resources to grok Emacs and use it well?

#134
post #41

The biggest difference between Emacs and any other editor is that instead of thinking about Emacs as an editor you need to think of Emacs as a programable workflow enabler. Using Emacs without learning Elisp is like carrying a bike on your shoulders instead of riding it. Once you get to the place where you can confidently write Elisp to solve your problems, you will miss Emacs deeply when you have to use any other ap…

linux (*nix) is also a workflow enabler, with a different ISA (Filesystem vs Buffers, processes and pipes vs functions).

I have yet to grok this mindset.. which is a shame.

Re: Ask HN: Resources to grok Emacs and use it well?

#135

Earlier quoted context omitted.

Spacemacs is getting decent press here. How recently have you tried it?

Spacemacs shows you what Emacs can be, but adds a lot of complexity that most people don't need. I am currently a spacemacs user (holy mode, ya dirty heathens) and I like a lot of the built in functionality. However, I think that I will eventually build up my own config from vanilla.

The joy of emacs is that you really can configure it down to a gnat's booty.

Re: Ask HN: Resources to grok Emacs and use it well?

#137
post #87

Earlier quoted context omitted.

Also seconding. Vanilla emacs is already extremely powerful, and if you're doing real work, you'll end up having to use hosts that don't have all of your wonderful enhancements installed. It's good to know vanilla emacs. Beyond that, add language modes for anything you need that's not already included. If you use 'git', 'magit' is very nice. Beyond that, helm is interesting, though very large and kind of mind-blowing…

> Also seconding. Vanilla emacs is already extremely powerful, and if you're doing real work, you'll end up having to use hosts that don't have all of your wonderful enhancements installed. It's good to know vanilla emacs. I wonder if I'm weird, but I use a highly customized Emacs on my dev machine, but if I have to ssh into a host and edit something I just use vi there. The correct answer to vi or emacs has always b…

I'm the same; I use evil-mode in emacs and find the friction of switching between them small.

Re: Ask HN: Resources to grok Emacs and use it well?

#139
Lots of great advice here already, and I'm probably too late for anyone to read this anyway, but I have a few things I'd like to mention.

First, I firmly believe that kabdib comment - that you shouldn't customize Emacs, or fiddle with it too much - is not good advice for the year 2020. Forty years ago (i.e., when kabdib started using it), I would have agreed with it (I'd have to be born first, though). In essence, the vanilla Emacs is a powerful text editor with macros, syntax highlighting for many languages, debugger and linter integration, split panes, great diff viewer, and so on. In short: vanilla Emacs is still loaded with features, especially if you compare it to EDIT under MS-DOS or MS Write from Win 3.1.

The problem here is twofold: due to strict GPL licensing requirements, the inclusion of new features in the Emacs core is not that fast, and (more importantly) the rest of the world hasn't been frozen for the last 30 years. What I mean is that today, the comparison is not Emacs vs. Notepad, but rather Emacs vs. (Sublime | VS Code | Atom | ...). The vanilla Emacs has literally no features you could see as an advantage over the other editors (and that's even before we start talking about modern IDEs).

Basically, the only thing Emacs has in its favor is this: it's a full-blown, incredibly efficient IDE for programming in Elisp, and it's been like this for the last 40 years. Thousands of programmers used that environment to build the tools for just about anything under the heavens, and most of their code is out there, on Emacs Wiki, in ELPA / MELPA repos, and all over GitHub.

To me, using Emacs without taking advantage of its ecosystem is simply a waste of time. So to summarize this point: you don't have to fiddle with your Emacs config too much, but one of the first commands you should learn is probably `M-x list-packages.`

---

Second, while I say you "don't have to," it's important to remember that you can fiddle with the config. The "incredibly efficient Elisp IDE" is always there for you, a single command away. You can use it to read the code and docs for any function or command you use (or want to). You can make a small change in command and have it immediately reloaded. You can put a breakpoint anywhere in any function and step through its execution while having call stack with all the (if not compiled away) variables and their values.

The browser-based editors could, in principle, offer a similar or better experience, but for some reason, they currently don't (yet). You don't necessarily have to use it right off the bat - or you can ignore it altogether - but when you need it, it's always there. Fixing a typo, disabling unused features, automating chains of commands, binding commands to whatever is convenient to you, and so on - Emacs allows you to do all of that more efficiently than any other editor I've seen (LightTable being dead and all).

Also, as for "endlessly tweaking" your config: in my experience, that's not what happens. It took me a year to learn Elisp, then I spent about two years trying out various packages, writing my own, adding some conveniences on top of what's provided, and so on. That was almost a decade ago, though, and since then, I touched my config with very minor edits every couple of months, and I tried out some new packages as they came, so maybe a few times a year? Something like that. This is because I made my Emacs fit my habits, and once I did, I have had no incentive to fiddle with it further. Why would I? It works exactly the way I want it to.

---

TLDR: first, learn how to install (and uninstall!) packages and how to customize them with the `customize-...` commands. Then, go through the "awesome emacs" on GitHub and play with any package that catches your attention. Ask for package recommendations on StackExchange or somewhere if you're not sure which to choose or if there's a package implementing what you want (there is). Then, if you wish, delve deeper: start debugging and editing the packages' code, learn Elisp in the process, write whatever helpers you need. And after that, yes, simply use the editor (your editor!) for the next couple of decades.

Re: Ask HN: Resources to grok Emacs and use it well?

#140
post #106
post #87

Earlier quoted context omitted.

> Also seconding. Vanilla emacs is already extremely powerful, and if you're doing real work, you'll end up having to use hosts that don't have all of your wonderful enhancements installed. It's good to know vanilla emacs. I wonder if I'm weird, but I use a highly customized Emacs on my dev machine, but if I have to ssh into a host and edit something I just use vi there. The correct answer to vi or emacs has always b…

I'm the same way, and I don't see why that would be so controversial. Vi(m) clearly has the better defaults, but Emacs is the better platform. (Then again, I'm the person who occasionally also uses ed just to keep it fresh in my memory, so there's that.)

They're just optimised for different jobs. Vim for line-based editing, emacs for nested. It just so happens that editing config files on remote hosts tends to be line-based, while editing code locally involves editing nested structures. I'll happily use both on the same machine though.
Post reply on HN