Live data from Hacker News

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

news.ycombinator.com

101–110 of 179 posts

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

#101

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…

Linux kernel developers would not want to use the third option on your list.

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

#102

Saying that as someone using Emacs for at least 20 years: ignore the zealots, get rid of this FOMO and ask yourself if there are 3 things missing from your tools, things that you would like to have a better way of doing. For these things, find someone experienced with Emacs and ask them to show you how they do it. Unless your passion is in going meta and focus on building the tools instead of using them, chances are…

You may just want something a bit snappier, say if you are coming from massive bloatware IDE land?

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

#104

Saying that as someone using Emacs for at least 20 years: ignore the zealots, get rid of this FOMO and ask yourself if there are 3 things missing from your tools, things that you would like to have a better way of doing. For these things, find someone experienced with Emacs and ask them to show you how they do it. Unless your passion is in going meta and focus on building the tools instead of using them, chances are…

You may just want something a bit snappier, say if you are coming from massive bloatware IDE land?

OP says he is experienced with vi, so it is not his case and I don't want to be playing a game of "unlikely hypotheticals"

But, even if that were the case, the recommendation would be to either (a) find a lighter alternative to the used IDE or (b) switch to an IDE that is plugin-based to remove all of the "bloatware". At no point I would be telling people that the first alternative for them to "be fast" is to join the church of Emacs.

Fuck, I worked with junior developers who were more comfortable after I showed them they could work with gedit + terminal instead of cargo-culting whatever tool some nerdy senior used.

All I am asking is to not be like those photographers that spend more time on forums discussing about equipment than actually taking pictures, or audiophiles that focus so much on testing their equipment that they forget to enjoy the music. Unless you are a camera maker/speaker designer/software tool developer, focusing on the tools instead of the product is quite a stupid way to live.

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

#105
I believe it's important to find a community which would offer quality real-time help. I've seen some, and the really good one was not in English so I can't recommend it, I guess. Freenode emacs chat is said to be filled with offtopic; that's not my cup of tea but you might find it useful.

Members of said lovely community thoroughly recommended Mastering Emacs to newcomers as a number one introductory text which I since do as well—mostly because they did. I also recommend built-in tutorial.

As for packages,

• helm or some other fuzzy completion thing; make sure your M-x, C-h f, C-h v do offer fuzzy completion, it improves discoverability greatly. Recent (27?) Emacsen may have something like this out of the box.

• avy: jump to positions on screen

• there are several packages that offer insert/command mode including the famous evil-mode but it's a good idea to get used to defaults. “Mastering Emacs” has something on this. I've heard macOS supports default Emacs keys everywhere (not true for other systems)

• which-key can display keys and commands available at the moment, quite helpful from the start. You can actually find some of this information with context menu but it is less convenient. The issue with which-key is, you need to configure it to actually see its stuff. A config for it may be found in the link below

https://github.com/a13/emacs.d/blob/master/README.org is a cleanly written init file; if you want a starter config for package x, try searching there for (use-package x ..) expression, copy it to your init file, press C-M-x and it's applied (note: it will often download the package, too). Many popular packages and built-in features are covered. Tweak some parameters, C-M-x, observe the changes immediately.

• last but not least, to make use of many existing configurations out there, you will need use-package. So install it early and learn to load it on startup (see the very config above as a reference)

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

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

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

#107

Earlier quoted context omitted.

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

I'm fine with not installing emacs, as long as no one ever asks me to fix their crap on those hosts. In practice, their stuff will always break, and they always will ask me to fix it. Production hosts should never be neutered. At a bare minimum, emacs-nox , strace , nmap , tcpdump , lsof . No exceptions. Tramp is great, but not all such hosts are reachable that way. > I prefer not to even touch other peoples' laptops…

Hopefully the Emacs is also configured to not leave tilde backup files everywhere!

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

#108
post #90
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'm in this school of emacs usage. I use Aquamacs on my Mac and while I've been using Emacs for almost as long as kabdib, I've barely scratched the surface of what Emacs can do. For me, the biggest thing that'll get me to drop out of IntelliJ (I was so happy to learn that there were Emacs keybindings hidden in one of IntelliJ's Mac keymaps) and into Emacs is to do ctrl-x(...ctrl-x) to record a macro, then ctrl-x NUMB…

I work the same way. Drop out of phpStorm or inteliJ into emacs to do some Marco recording. I tend to use f3 to record and f4 to run said macro.

That and white space mode for examining files..

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

#109

Earlier quoted context omitted.

It's interesting to me that the top two comments (at the time of writing this) are fundamentally opposite advice. Yours, to customize Emacs, vs. the second, to basically not customize it at all.

My take on that is... For those fundamentally interested in developing development environments, coding tools, or making your editor your hobby, diving deep into emacs customization is a reasonable thing to do. In other words, if creating things like evil-mode or spacemacs excites you, a dive deep into emacs is a good option. For those who aren't interested in those things, try to actively avoid deep diving into emac…

Definitely. I guess the interesting part specifically is that, if you aren't the type to care about making a development env a hobby, why would you ever even touch emacs?

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

#110
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…

Stock Emacs and off-the-shelf add-ons are pretty powerful, but I agree that one is really missing something by not writing their own little tweaks.

You can learn Emacs well just by starting with this manual and beginning to tweak Emacs to do things you want: https://www.gnu.org/software/emacs/manual/html_node/elisp/

Emacs Lisp is very low-friction to start hacking on. There's no SDKs to download, no IDE to install, no developer mode to enable, no project wizard to run, no source tree of template files to start from, no program to attach, no emulator to run, to separate build to run, no sandboxing, etc. You can just start Emacs, and start editing Emacs Lisp expressions and evaluating them, and you can change the code of your running Emacs in a very straightforward way.

I initially started by writing little fancy editing features for C and C++ coding (e.g., format my comments a certain way, do a expression transform, etc.), and then started writing to editing modes for my employer's proprietary languages. The public bits are at "https://www.neilvandyke.org/emacs/". That was my introduction to Lisp hacking, and eventually I gravitated to Scheme.

Post reply on HN