Live data from Hacker News

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

news.ycombinator.com

31–40 of 179 posts

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

#31
I've found the Emacs Wiki always solidly maintained: https://www.emacswiki.org/emacs/SiteMap

S. Chua's blog is the best "zine" I think: https://sachachua.com/blog/

To avoid "but vi/vim and the shell…" which is a sort of "mental flu" every Emacser has to go through at least once in his life, understand this:

"the UI paradigm of Emacs" is also called a roguelike interface by ESR, vi's too: "In Chapter 11 we described the effect of the absence of standard arrow keys on early roguelike programs; vi was one of these. " http://www.catb.org/esr/writings/taoup/html/ch13s03.html

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

#32
post #17

Emacs user here, it's been my go-to editor for about 40 years. I have a few customizations, not many. My .emacs file is 63 lines long, doesn't include any other files, and mostly just tweaks some key bindings and turns off features that I don't like. The only modes I use are built-in ones (e.g., C-mode, auto-wrapping text mode, etc.). I can't write elisp without a reference manual, and I think that's okay. I suggest:…

I had to go to Spacemacs[1] for a few reasons:

- Using the spacebar to invoke functionality is a massive physical boon to usage. Stock emacs wrecks me from fingers to neck for an real amounts of usage. This is a purely subjective weakness.

- Spacemacs vi emulation. I drank the modal Kook-aid. Especially if one has to SSH into headless instances in the cloud. vi is part of the POSIX standard, so you know it's there and it's robust.

- Spacemacs engineering. Great package integration in the form of layers.

[1] https://www.spacemacs.org/

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

#33
post #23

I'm a moderately experienced Emacser - been using it heavily since 2009 (first encountered it in 2003). I have written a few small extensions and contributed features and bug fixes to bigger ones. Credentials established, I cannot recommend this tutorial enough: https://david.rothlis.net/emacs/tutorial.html He walks you through most of the core of what makes Emacs great by showing you how to make a change to a projec…

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

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

#35

Earlier quoted context omitted.

Forgive the noise, but I second this. I haven't committed a hundred key combinations to memory. I find that knowing the twenty things I need to know (which are different for everyone), and having another twenty in my back pocket for once or twice a year has lasted me since 1992, and left me very satisfied indeed with emacs.

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…

> 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.

If you're talking about production hosts, they shouldn't really have vanilla emacs installed either. Not having your creature comforts present on production machines is a feature, like the red shell prompt / terminal background some people use, a reminder to get you to think twice and try to not do things directly in production. If you really must, just use TRAMP, it's amazing.

If, on the other hand, you're talking about using somebody else's laptop to do anything, that doesn't make sense to optimize for, at least in my experience. I prefer not to even touch other peoples' laptops/keyboards.

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

#36
I would honestly just start out with either Spacemacs or Doom Emacs. There is a lot of information on these 'distributions' and many YouTube videos, as well. These 'distros' will allow you to quickly get a feel for the power of Emacs, because they contain sane defaults that will enable you to get a quick feel of what Emacs is capable of. After doing this, you might decide to scrap them and start with a default Emacs installation that you slowly build up. But that is a huge investment of time and you should at least try these popular alternatives before you go into the crazy time sink of 'rolling your own' system. I realize that many purists might take issue with this suggestion, but it's what worked for me.

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

#37
post #28
post #17

Emacs user here, it's been my go-to editor for about 40 years. I have a few customizations, not many. My .emacs file is 63 lines long, doesn't include any other files, and mostly just tweaks some key bindings and turns off features that I don't like. The only modes I use are built-in ones (e.g., C-mode, auto-wrapping text mode, etc.). I can't write elisp without a reference manual, and I think that's okay. I suggest:…

There is another positive side effect of limiting customization to reasonable levels. Default Emacs shortcuts are hidden everywhere. Most importantly, bash understands them, as well as many other REPLs (erlang, ghci, julia, ...). Developing muscle memory for the default Emacs allows one to use many tools much more efficiently.

Default Emacs shortcuts are bad for RSI. Even the original author of Emacs has had to cut down pretty dramatically on their coding activity, due to getting "Emacs pinky" and other RSI problems.

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

#39
Emacs is weird. I’ve been using it for a few years and am definitely far from an expert.

Emacs led me to elisp which led me to Common Lisp which led me to scheme which led me to racket, each of which has its own unique set of literature.

I’m enjoying the journey. It’s a refreshing change of pace from the ever-changing, cutting-edge, hyped-up programming world many of us live and work in.

Emacs has also led me to further interest in macros, compilers, and programming languages.

If you don’t have prior experience with lisps I’d recommend Gentle Introduction to Common Lisp, How to Design Programs, or Practical Common Lisp. The fundamentals from each apply well to elisp.

If you want immediate(ish) productivity, id recommend emacs prelude, doom, or spacemacs.

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

#40
I've been using emacs for several years. If you saw my init file, you'd think it was kind of funny. It's mostly to change the look from default to a black box.

I do have some functions for connecting to databases, but for the most part, there are no deep customizations.

I also have avy (think that's jump mode in vim), ldo for file browsing, yasnippet (for snippets), multiple-cursors, and some language-specific major and minor modes.

I mainly want to press C-c C-c and get my work done.

------

As a general rule, emacs is pretty easy:

* C = basic

* M = more powerful

* CM = most powerful.

So...

* C-f = move forward one character

* M-f = move forward one word

* CM-f = move forward one bracket

A lot of things are sort of mnemonic:

* f - forward

* b - back

* r - rectangle

* s - search

* r - reverse search

The biggest thing to remember is that "yank" has the opposite meaning in Emacs. In emacs, you can either "kill" (cut), or "copy", then you "yank" to (paste). This is a function of how the Emacs "kill ring" works. This extends to the above:

* C-y - yank the last item

* M-y - scroll back through the backlog of the kill ring.

Everything sort of falls out from this logic. If had to be completely honest with you, I probably use 20% of the total functionality of Emacs. It's a huge system, but I get my work done efficiently and don't sweat that I can't write a bunch of elisp from memory.

Post reply on HN