Top
Best
New

Posted by weakfish 2 days ago

Ask HN: Where to begin with "modern" Emacs?

Hi all,

I’m a longtime Neovim user who’s been EMacs-curious. The hold up for me has been that I’ve been unable to find a source of truth for what’s top-of-the-line as far as plugins are. With Neovim, it’s a safe bet to look at what folks like Folke are doing, but I have struggled to find a similar figure in the Emacs community who gives insight into what’s-what. I know Doom exists, but I want to fully “own” my config and not over complicate it.

Thanks!

214 points | 114 comments
xenodium 2 days ago|
Welcome to Emacs!

- I write about Emacs things fairly frequently: https://xenodium.com

- I started making Emacs videos recently: https://www.youtube.com/xenodium

- For aggregated Emacs blogs, check out https://planet.emacslife.com

- For aggregated Emacs videos, https://emacs.tv

- The Emacs subreddit can be handy too https://www.reddit.com/r/emacs

- If on the fediverse, follow the #emacs hashtag

- Sacha Chua's Emacs News are great https://sachachua.com/blog/category/emacs-news

With respect to "modern", maybe these two posts could be of interest:

- Visual tweaks: https://xenodium.com/my-emacs-eye-candy

- macOS tricks: https://xenodium.com/awesome-emacs-on-macos

Enjoy the ride!

chipotle_coyote 1 day ago|
Sort of side question, but why do you set the command key to be Emacs' meta key? I've sort of waffled on that myself -- the plus to doing it is that it matches Windows (which I am in too much of the time) and Linux, but the minus is that it not only breaks 20+ years of muscle memory I have with MacOS, it collides with a few other global hotkeys. (Recent collisions I've noticed are Alfred's clipboard manager, which defaults to Shift-Command-\ (M-|, shell-command-on-region), and the system-level screenshot hotkey on Shift-Command-5 (M-%, query-replace).
hibbelig 1 day ago|||
For the keys you don’t need to type quickly, M-x can also be typed as ESC x. For any character x.

So it works well with M-|, but not so well with M-f, for example.

xenodium 1 day ago|||
Ah yes. I find the ⌘ key placement a little more ergonomic/convenient, but at the end of the day, pick whatever works for ya.

Thinking back, I prolly didn't use those two commands often enough to internalize M-| or M-% bindings, so the system-level handling didn't bother me. While I do replace things all the time, I typically use multiple cursors (I do use bindings for that). If I need querying, I just type `M-x que RET` which gets picked up by a completion frameworks (in my case ivy).

Relatedly, I also use Hammerspoon on macOS and set some global key bindings using the ⌥ key.

kevstev 2 days ago||
I saw what was possible with emacs via systemcrafters: https://systemcrafters.net/emacs-from-scratch/

And I should note I have been using it for about 25 years, and was mostly in the dark about what it was capable of, though many of those years were in environments where I was using versions 5-10 years out of date, and completely locked down/out of things like melpa.

As far as keeping up with whats latest and greatest, I think the real answer is there isn't a good online resource. There are emacs meetups and conferences and some are virtual, and you can ask around other power users and see what they are doing. I even find emacs packages to be pretty poor at selling themselves on why you should use them.

As an example, Ivy and Counsel are kind of game changers to the UI, but I don't think you get any idea of that from their manual or main github page: https://github.com/abo-abo/swiper

omnicognate 2 days ago||
Vertico and Consult are the successors to Ivy and Counsel. They're more cleanly integrated with the native capabilities. I've found them a big improvement.

Systemcrafters have a video on moving to them, but I haven't watched it.

senkora 2 days ago|||
+1 to systemcrafters. It is probably the closest community to what you are looking for.
ews 2 days ago||
+2 , it's an amazing resource for emacs and guix
MkLouis 2 days ago||
+1 from me aswell.

I personally started with SystemsCrafters and after I started to grok Emacs I went to use DoomEmacs. I found DistroTubes literate DoomEmacs Config a good starting point to see whats possible. https://gitlab.com/dwt1/dotfiles/-/blob/master/.config/doom/...

ashton314 2 days ago||
I maintain a pretty popular Emacs starter-kit called Bedrock. [1] I suggest starting with it, or at least taking a look at it to get some ideas!

Bedrock differs philosophically from Doom et al. in that Bedrock is meant to be as simple as possible. There's no magic, no extra package management system (looking at you Doom) to break or confuse. By default, it doesn't install any 3rd-party packages—it just sets better defaults. Recent versions of Emacs can do a lot, but the defaults are painfully outdated. Bedrock fixes that. It's basically a vanilla Emacs experience without some of the cruft carried over from the previous century.

Bedrock also comes with a curated set of packages to enhance Emacs beyond better defaults. You can load these into your config as you begin to need them. List here: [2] If you are looking for a set of "modern" packages, this is it. I do pretty well keeping up in this space, and a lot of these (esp. Vertico, Consult, Corfu, etc.) seem to be accepted as the de-facto best replacements for older packages like Helm, Ivy, etc. (That said, I should add some config for Casual—very neat package to help with seldom-used features of Emacs.)

Bedrock is meant to be understandable: clone it once, and then tweak from there. You'll find a lot of forks of Bedrock on GitHub as people have forked it and then built their own config on top.

I'm working on updating Bedrock for Emacs 31. There won't really be that many changes, so like, don't wait for 31 to start your Emacs journey, but know that Bedrock is actively maintained and that the packages I've curated for it are the best I could possibly find. :)

Oh, also, if you search "best Emacs packages", my blog post [3] will come up on the first page on basically every search engine I've tried. ;)

Happy hacking!

[1]: https://codeberg.org/ashton314/emacs-bedrock

[2]: https://codeberg.org/ashton314/emacs-bedrock#extras

[3]: https://lambdaland.org/posts/2024-05-30_top_emacs_packages/

kingkongjaffa 10 hours ago||
I used spacemacs in the past primarily to drive org-mode. Fell out of love with it after a few years and moved to pen and paper bullet journal.

Interested in trying emacs again with something simpler, will give bedrock a try!

aquariusDue 1 day ago|||
Thank you for making and maintaining Bedrock! In the past I've used Emfy as a starting point but some time ago I declared Emacs bankruptcy and started from Bedrock, every chance I get I recommend it now.
ashton314 4 hours ago||
Thank you for the kind words. :) I'm so glad it was useful to you.
stebian_dable 1 day ago|||
Bedrock is a great starting point. Plays well with https://github.com/bbatsov/crux also.
presto8 1 day ago|||
+1 for emacs-bedrock! It helped me get started with reasonable defaults out-of-box. From there, I started adjusting it to my own needs.
ashton314 4 hours ago||
> started adjusting it to my own needs

Yay! That's 100% what it was made for. Any suggestions on how to make key features more discoverable welcome.

scott01 2 days ago|||
I’ve recently rewrote my configuration and used Bedrock as a new starting point. It’s great, thanks very much for making it!
ashton314 4 hours ago||
You're welcome! I'm glad it was useful for you. :)
weakfish 2 days ago||
Great, thank you! I will definitely reference this.
ashton314 4 hours ago||
lmk if you get stuck—feel free to open issues on Codeberg. (There's a GitHub mirror too where you can open issues if you don't have a Codeberg account.)
defanor 2 days ago||
I think the usual advice is to try the vanilla Emacs, maybe use better-defaults (either directly or just for inspiration), as it is a relatively light customization. The setups people use tend to be quite different, as do their opinions on packages, so I doubt there is a single satisfactory and agreed upon "source of truth". Others' setups may be useful to check out, possibly pages of emacswiki.org, chatter on the #emacs IRC channel at libera.chat.

Edit: As for heavily customized versions (Doom, spacemacs), I have not tried those myself, but occasionally saw people having issues with those, and others not being able to help them, since it was not clear what sort of magic is going on there. So I would not recommend those to new users, at least not if you would like to learn the basics and get a better hang of it, to be able to debug it, though some seem to be happy with those.

tammer 2 days ago||
I will second the recommendation to start with vanilla emacs. That isn't to disparage releases like spacemacs & doom. I simply found those to be more useful once I fully understood the power that comes with a fully reprogrammable editor. There is a learning curve and there is also a mental model to adopt, and I think that adopting the mental model is easier when starting raw and building up from scratch. Once you feel comfortable maybe try spacemacs or doom to see if they offer advantages for your workflow.

I also highly recommend the resources at https://www.masteringemacs.org

SoftTalker 2 days ago|||
Another vote for vanilla, learn the basics and then add packages for what you need.

I have spent my entire career using vanilla emacs with a few other packages. A lot of things, including org-mode, are included by default in modern emacs.

The problem with learning heavily customized distributions like Doom is that they won't be installed elsewhere and if you have to use emacs on another system you won't have what you're familiar with. Weigh that relative to how often that happens in your work.

pfortuny 2 days ago|||
Yes, before playing football, children just mess around with a ball. The thing is to end up using the ball properly, not to play as Messi.
weakfish 2 days ago||
I think that's the route I'm gonna go, I want my configuration to be transparent and built so that I can understand it top-to-bottom. I've tried Doom, but it felt too magical.
nairadithya 1 day ago||
As a Doom user, the benefit is largely in discovering the absolutely vast plethora of features that Emacs and Emacs packages lend to you in a nice set of defaults and aesthetics that shouldn't feel too alien as a Neovim user. I encourage you to give it a week in parallel with your actual config.
Karrot_Kream 2 days ago||
If you don't want to use a distribution like Doom (which I don't fwiw and I've been using emacs for 20-something years), then I'm a big fan of minimal-emacs [1] a compact init.el and early-init.el that configures vanilla emacs into a good, default state. From there I would pick and choose which packages I'm interested by going through the Systemcrafters's community [2] as others have mentioned and Reddit's r/emacs community. While Systemcrafters is a fun community I'm a bit reluctant to spend too much time there because it's more of a tinkering community than a day-to-day-usage focused community. Fine if you want to tinker all day with your config but not the best for getting work done.

One thing I urge you to remember is that unlike neovim, Emacs isn't about just enabling and disabling plugins. Emacs is a Lisp environment. It really comes into its own when you program it. To that effect, I would read through the GNU Emacs info manual. Emacs ships with its manual in its inbuilt info reader and you can also find it in HTML [3] by GNU. Try not to think of your emacs as a constant soup of plugins and instead a codebase that you manage. The environment is very amenable to introspection, and there's inbuilt commands like `describe-key` and `describe-function` that pull up documentation for elisp. I'm a fan of the `helpful` package which I find to be a better version of `describe`.

[1]: https://github.com/jamescherti/minimal-emacs.d

[2]: https://systemcrafters.net

[3]: https://www.gnu.org/software/emacs/manual/

alfiedotwtf 1 day ago|
> I'm a big fan of minimal-emacs [1] a compact init.el and early-init.el that configures vanilla emacs into a good, default state. From there I would pick and choose which packages I'm interested by going through the Systemcrafters's community

+1

I found the best way to approach Emacs was to start with an empty init.el and then just start using it. Every time something annoyed me or I thought “there should be a package to do X”, I stopped what I was doing and went hunting…

By doing it this way, you’re actually using it from the start and get to slowly taylor it to your personal needs.

Also, I am not yet an Elisper, and so for the macros I’ve wanted to write, ChatGPT has been really helpful.

Aidevah 2 days ago||
A lot of modern packages which began outside emacs have now been gradually been merged into the main emacs tree and come pre-installed (use-package for clean per package configuration, eglot for LSP support, tree-sitter, which-key etc). So you just need to learn how to configure them.

The most important packages which make emacs feel "modern" that are still outside the emacs tree for now are the ones which makes completion better, both in the main buffer and also in the minibuffer (what others may call your "command palette"). They are

- consult: search and navigation commands, provides candidates for...

- vertico: vertical display of candidates in the minibuffer

- marginalia: annotations for the candidates

- orderless: orderless fuzzy match for candidates

- embark: right mouse context menu for candidates

Getting these setup would make your whole journey onwards much smoother.

scott01 2 days ago||
I second this approach. After setting these ones up, together with lsp-mode and company-mode (I like experience better than eglot), my configuration stayed mostly the same. I also kept adding new shortcuts for functions I needed (like symbol rename or function list), and am currently at a point when Emacs became a very efficient editor for me personally. I also moved most of these shortcuts over to yyIntelliJ editor at work where Emacs is not very practical due to lack of convenient debugger (C++, Unreal Engine).
alfiedotwtf 1 day ago||
I wanted to go down the Egypt path, but lsp-mode supports DAP whilst the now-built-in Eglot doesn’t?! :(
dingnuts 2 days ago||
Mickey Peterson's blog/book Mastering Emacs is where I wish I had started.

https://www.masteringemacs.org/article/beginners-guide-to-em...

Sacha Chua maintains a blog roll with a huge part of the Emacs community represented, also: https://planet.emacslife.com/

Also everything Prot writes is great, here's his getting started guide: https://protesilaos.com/codelog/2024-11-28-basic-emacs-confi...

az09mugen 5 hours ago||
Being a sublime power user I really like the philosophy of emacs. The only thing I regret are the keybindings which are not the ones I'm used to. I found ergoemacs [0] to be a really good initiative but unfortunately it felt incomplete when I tried it. I had the project to re-bind emacs keybindings to make them work like in sublime but it seemed too much of an effort. I really wished someone made that already but never found anything close on the web. It feels like I'm alone in a very weird niche.

[0] https://github.com/ergoemacs/ergoemacs-mode

hommelix 2 days ago||
I'm a vim user, using orgmode. I've noticed the blog of Sascha Chua. She posts Emacs News and in these posts there are some orgmode gems. But she is posting more on Emacs. Maybe interesting to look these posts up: https://sachachua.com/topic/
foobarqux 2 days ago|
Don't use doom etc, just standard emacs, otherwise you won't have any understanding of what is happening and how to fix it. Here's a list of what I think is important, roughly more important to less:

    - corfu+marginalia+vertico+embark+orderless is the standard completion stack now
    - magit (maybe also see also the "casual" the transient front end for other modes)
    - avy
    - (fset 'yes-or-no-p 'y-or-n-p)           ; 'Y' or 'N' instead of 'Yes' or 'No'
    - (setq confirm-kill-emacs 'y-or-n-p)
    - evil (optionally if you like vim keybinds, you still need to know basic emacs))
    - if using evil: evil-collection, evil-args, evil-goggles, evil-traces, evil-escape, evil-nerd-commenter, evil-lion, evil-surround, etc are not "standard" but still useful 
    - configure melpa source
    - which-key
    - helpful
    - undo-fu
    - gptel
    - projectile
    - eglot
    - saveplace
    - desktop
    - uniquify
    - dired/wdired
    - flycheck/flymake
    - treesitter
      
Stuff that is nice but less essential:

    - general (for making your own keybinds)
    - some kind of multicursor mode (I use iedit but it's simple)
    - yasnippet
    - org (usefulness depends on the person)
I haven't switched to corfu+marginalia+vertico+embark so I don't know what the equivalent is but helm-swoop is nice.

Also, very important, learn the help system (C-h <key>), especially C-h f, C-h k, C-h w, C-h c. And the info system

aquariusDue 1 day ago||
Great list!

For modal editing but more similar to the kakoune/helix model there's the meow package which I prefer compared to evil, for some people it might be worth looking into as its more customizable and allows you to have as much or as little modal editing as you want. I use meow and regular Emacs key chords at the same time without issue for example.

kccqzy 2 days ago||
> Don't use doom etc, just standard emacs, otherwise you won't have any understanding of what is happening and how to fix it.

Doom and Spacemacs are IMO sufficiently good abstractions that you will almost never need to have understanding of the underlying system and to fix things. Sure for curiosity's sake you should still learn what's happening under the hood. But the abstraction is almost never leaky. I think everyone beginning Emacs should start with Doom or Spacemacs and optionally build their own config later on.

flimflamboi 1 day ago||
[dead]
More comments...