Live data from Hacker News

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

news.ycombinator.com

161–170 of 179 posts

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

#161

My answer is to embrace the challenge of learning Emacs Lisp and using it. Personally I think Emacs makes most sense for those who think learning and using some elisp sounds fun/interesting. What I’m not sure about is what to recommend for learning it. I remember finding it non-obvious how to learn it.

Once you understand basic Lisp, (e.g., have worked the first half of the Little Lisper or the Little Schemer or the first few chapters of Structure and Interpretation of Computer Programs) the official Emacs Lisp manual [1], M-x describe-function and (progn (info "elisp") (Info-index topic)) are all you need. At least that has been my experience.

My favorite thing about writing Emacs Lisp code is that it is easy (e.g., just an 'apt get' on Debian) to install the aforementioned manual locally -- and the other resources I mentioned a part of the basic Emacs install -- and once I have installed that manual, I don't need internet connectivity when I am writing Emacs Lisp code. (Not having internet connectivity means I waste less time browsing around aimlessly.)

[1]: https://www.gnu.org/software/emacs/manual/elisp.html

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

#162
A lot of good advice here. I'll just say two things: use the built in tutorial. It's actually pretty good, and the built in help can get you going from there.

Also, not as a tutorial, but more as a reference, https://emacswiki.org/ is a great site for not just information on the editor itself, but all the various modules/hacks people have contributed.

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

#164

Earlier quoted context omitted.

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'll be honest, my experience since has been that VSCode is... just better? I've been using vim/emacs for over 20 years now so it's a tough pill to swallow, but after trying out VSCode, I have to say that making it easy to program extensions with async functionality from the get-go was the right way to go. I think no combination of rtags, cquery, clangd, lsp, etc in Emacs/Vim/Neovim can approach the performance and quality of VSCode's C++ dev experience. And I say that having honestly tried every permutation of the above for many hours across many weeks.

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

#165
post #146
post #119

Earlier quoted context omitted.

This advice is fine for the first year or so, but afterwards I would start trying out various packages and customizations. There are packages that can make your experience much better (projectile, swiper, ace-window, ace-jump, move-border, eyebrowse, winner, color-identifier-mode, off the top of my init.el). And, of course, if you do any programming at all, you should install magit immediately. It is the best git exp…

In case you weren't aware, winner-mode is now part of Emacs, and as far as I can tell the Emacs 27 tab-bar-mode makes eyebrowse redundant. For me project.el that ships with Emacs is enough for my project needs.

Hmm. Do you mean that tab-bar-mode lets me have a full-screen Emacs (no UI elements whatsoever, as one does) and switch between window configs like if they were workspaces (which is what eyebrowse does)?

If so, I might want to try it.

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

#166

I am keen to crowdsource a study of emacs workflow practices, where we can collect, compare and analyse different development practices among emacs users. This should help other emacs users to borrow modes/keybindings/specific techniques/tricks. * Motivation This is inspired by an ongoing conversation about emacs with a friend and a debugging interview that I really enjoyed. * Exchanging emacs tips with a friend A fr…

I would be. You're not making it very easy to contact you - I don't have a Twitter account, and I couldn't find your email either here or on github, or on your page/blog. If you happen to see this comment (I'll add another with some thoughts on the matter), please shoot me an email (in my profile).

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

#167

I am keen to crowdsource a study of emacs workflow practices, where we can collect, compare and analyse different development practices among emacs users. This should help other emacs users to borrow modes/keybindings/specific techniques/tricks. * Motivation This is inspired by an ongoing conversation about emacs with a friend and a debugging interview that I really enjoyed. * Exchanging emacs tips with a friend A fr…

In general, I avoid coding contests, especially if they focus on speed. This idea, however, caught my attention as something I'd like to both participate in, and obviously, to see the results. I'm a reasonably proficient Emacs user, and my config is (just checked) just shy of 5k loc mark. I would love to see if all the hours I put into writing that code make any difference.

I'll have more comments later, but the first two, slightly related to each other, would be:

1. Are you sure using just one language for the code is a good idea? It's going to instantly turn off large segments of people who would otherwise like to contribute - no matter which language you choose. Further, "the most popular language" may not even be appropriate: there's probably less Java, C#, and C++ programmers who use Emacs compared to the general population. I think the first step here should be a poll to see which languages are actually popular among Emacsers. Once we have the list, we can prepare a couple of codebases using the top 5 entries (for example.) I think I can contribute here - I don't think there'll be a language I'm unfamiliar with on the list. I'm also reasonably confident that, in case the improbable happened, I'll be able to learn that language in a few days. (Assuming there are docs available and so on, the usual disclaimers :))

2. Another consideration: how much time would participants have to prepare? I believe this is crucial. In my case, I have a bunch of "first-class" lang configurations, for the ones I spent the most time with, and "the rest," with configs just barely above bare-bones. If you give me a month, I guarantee I'll have all the possible tools you could use with the lang prepared, and I'll have quite a few hours of practicing their usage. If I had to go for it right now, and the implementation language happened to be outside of ~10-15 languages I use regularly or used extensively in the past - I don't think I'd be up for it.

> Starts a fresh emacs instance

Why a fresh one? Do you want to measure startup time (and later, performance in general)? But then people on the latest and greatest would have an advantage over someone working on a netbook.

> a emacs lisp script

I wonder if this wouldn't be better handled by an external tool. I don't know which, but it might be worth considering.

> logging keypresses/function calls might feel intrusive

You don't need keypresses - commands and functions would be quite enough. To be honest, I'd prefer a short chat with a participant afterward, maybe coupled viewing the replay at 10x the speed. What is valuable, I think, is the thought process behind the chains of commands, and "decompiling" those out of the "assembler" (key presses) of people's minds might prove quite hard.

That's it for now, I'll be happy to talk more about the idea, though I think we should take the conversation off the HN. My email is in my profile :)

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

#168

Earlier quoted context omitted.

you definitely can use evil mode but you will find a lot of edge cases where you have to configure something in some modes to behave sanely whereas with spacemacs they have usually done all that legwork of anything you want to use.

You also have doom which is just evil and not space centric AFAIK

i'm a large fan of space as a leader key even coming from vim so spacemacs felt like a natural extension. but yeah doom works for many people

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

#169
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 an…

I considered Spacemacs, because I used Vim extensively in the past (and still use it for some tasks), but I felt that Vim emulation in Emacs would only hinder my understanding of Emacs and steepen the learning curve. So I ended up incorporating useful bits and pieces from Spacemacs into my .emacs config, but stayed with native Emacs key bindings. I'm comfortable with my choice, but please change my mind if you feel like it.

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

#170

Earlier quoted context omitted.

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

magit? Why not?

Some coding styles insist on tabs. I was referring to the third line of your configuration as quoted below.

; try not to use tab characters ever when formatting code (setq-default indent-tabs-mode nil)

Post reply on HN