Hacker News (curated)new | past | comments | ask | show | jobs| show hidden

Is anybody here consciously trying to keep their Emacs configs/setup "lean", minimalist, as small as possible?

I'm not a coder, but I did use Emacs daily around 2010-2012, with brief returns later. I always gave up eventually because the complexity of addons, the org-mode-can-do-everything-so-I-should-do-everything-with-it etc just grew over my head. I've discovered that I like Plan9 Sam, Acme and, in general, the one-thing-well camp better. Each their own, I guess.

That said, I did often like how "immersive" using Emacs can actually be at times. I'm a trained journalist, and it made managing bits of information, including PDFs etc, really streamlined, almost like a wonder. And, I had my own little OS on a USB stick that way (though the minimalist in me always whined that "an editor" should not weigh 100+ megabytes).

Incredible that it has been around for 50 years, with no signs whatsoever of being a "paradigm of the past".



I've been using emacs for ~15 years. I don't now what is considered lean. My init is 343 lines. Probably removing all the comments and junk collected over the years it is likely ~200 that actually does anything useful at this point, I should probably clean up. I use emacs everyday. I get the desire to want to do everything in emacs but I also don't. It is good at what it does, it happens to do other things too but I don't know if that is the best way to work.

I've been using emacs for around 30 years and your comment made me curious. My .emacs is 237 lines. It used to be more, but I cleaned out the Java and Octave support I wasn't using anymore.

> Is anybody here consciously trying to keep their Emacs configs/setup "lean", minimalist, as small as possible?

Me too, for some reason. I've been using Emacs for 8 years and my init.el is 94 lines long. I guess the defaults mostly work for me.


> keep their Emacs configs/setup "lean"

With my last bankruptcy where I tried to dissect my 12K LOC config to identify the bloat and the crap I no longer needed, I found very few pieces that weren't used. Turns out, my config was already modular and lean, in the sense that everything I had there had a practical reason to be in there.

Once I started using LLMs to deal with Emacs, I decided to add a bunch of tests to run them in CI, just to prevent regressions. My config since then has grown to 26K LOC + 35K of tests. I consume 250 third-party packages, plus about 100 built-in libs.

My Emacs starts and loads within a second. I have no problems such as freezing, breaking or leaking memory. With all this stuff I have in it, it can run for days and weeks and its memory usage on Mac stays within a comparable range with the Slack app - around 500MB.

I never understood this obsession with keeping Emacs lean. Bruh, throw some shit into it, let it burn, it'll chug on any large amount of Lisp and still give you the smoothest ride ever. What's the point of keeping a colossal beast under a mountain and feeding it a low-calorie diet? It's like digital abuse. Emacs these days is capable of rendering Doom-level graphics, it's offending to use it like notepad.exe.


I had a similar experience where I tried to declare bankruptcy after havning not used emacs for a year and a half or so, ended up re-implementing things until finally I was like 'no I was right the first time'.

That said, damn, my emacs config is like 1000 LOC and takes like 20 seconds to load. Also the reason I keep leaving Emacs is definitely the complexity of the bugs and the edge-of-the-edge case things that come up when I'm just trying to do something simple (the other day it crashed after running `e: newfile`, the evil mode command for editing a new file. I have no idea why it crashed but after it did the program couldn't be killed. Maybe it was because I was trying to open a file with no extension, but even that's a stretch.

Anyway would you mind if I sent you my config sometime or looked at yours? It's never occurred to me to write regression tests


Of course¹, but I warn you - it may feel massive, I do tons of (at first) seemingly weird stuff. Like OCRing images in my clipboard (which is now a separate package²)

---

¹ https://github.com/agzam/.emacs.d

² https://github.com/agzam/clipimg.el


I ran Emacs for ~25 years with almost no custom configuration. I could not be bothered, and the defaults were great

In the last decade I have started to add configuration. When GPT-3 became available, and I did not have to learn Elisp (another f%^&*n computer language - with no other use) I have extensively configured my Emacs

My point is it is very usable with no config


I usually just use Prelude for some modern defaults

> though the minimalist in me always whined that "an editor" should not weigh 100+ megabytes

Heh. At work many in our department installed a (voluntary) tool that logs the apps we have in memory, and how much RAM they consume.[1]

My manager came to me and said "Your Emacs is taking 8GB of RAM?!"

Guess we should call it EGACS now.[2]

I had an LLM do some debug and it turned out my copy of Emacs is a bit buggy in MacOS. Every time I open a new frame, and then close it, it doesn't release a lot of GUI related stuff. Over several weeks, this leak adds up. I open new frames multiple times a day.

And of course, I got the LLM to make a package I can load in Emacs that cleans it all up without needing to quit.

After cleanup, it's taking "only" 1.5 GB of RAM.

[1] Company is dramatically reducing the amount of RAM on new laptops, so we want to gather data to show it's too little RAM.

[2] For those who don't get it, a common joke decades ago was that Emacs stood for Eight Megabytes and Constantly Swapping. Back when 8MB RAM was huge.


> Is anybody here consciously trying to keep their Emacs configs/setup "lean", minimalist, as small as possible?

I tried but most of my config is just variable settings (with the use-package macro). I don’t really have custom code there. If I do think about a feature, I tried to build a package instead (like one for bridging subsonic and emms).


> If I do think about a feature, I tried to build a package instead

I suppose this is actually the way of keeping a "lean" Emacs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact | github