Hacker News new | ask | show | jobs
by mynameismon 1607 days ago
Maybe it's me, but starting out with Emacs the previous month, I tried using Doom Emacs the other week, and the number of packages it was being used frightened me. Building your own init.el is much much better, because you know your Emacs in and out, and dont have random keybindings triggering stuff. Maybe I'll never get the popularity of Doom
8 comments

Some people like ready made Emacs distros, some people like hand coding their init.el (don't forget your early-init.el!) Some people like Arch, some people like Ubuntu. Some people like Linux From Scratch, some people like typewriters. Live your life, be free.
It sometimes seems to me that there's this idea that unless you're customising Emacs and gaining complete understanding and mastery of its primitives, there's no reason to use it over another editor. As if the core editing experience is so horrible, why would you go through all that if you're not going to use the superpowered bits? I think this is doing a big injustice to how good most of Emacs and the packaged up versions are, even without a line of elisp.
> ... don't have random keybindings triggering stuff.

As a long time Emacs user, I feel that this is slightly unfair. When I first started out, I found that my documents from Emacs were far more common than in other editors. It took me two years to realise that I was often bumping C-t where trying to hit C-r or C-y and silently transposing two characters. In over twenty years of Emacs usage, I have never once used C-t on purpose. I feel that this perfectly matches the "keybindings triggering random stuff" experience and it is fully there in vanilla Emacs.

With twenty years of experience, I have my own, esoteric init file that I would not recommend on any newbie. However, I personally feel that Emacs has succeeded despite its default keybindings.

> In over twenty years of Emacs usage, I have never once used C-t on purpose.

This is funny to me because, while I'm not an Emacs user, I'm a Mac user who's gotten used to the tiny subset of Emacs keybindings built into Cocoa text fields, and I use C-t fairly frequently! Apparently you do not make character transposition errors as often as I do.

That is really interesting. To be fair, I should have prefaced that I have cerebral palsy, so my typing patterns are likely different from most of the population.
I just wish M-t worked in the Cocoa text fields, I somehow use that more than C-t. And M-d, too—I accidentally type "∂" a lot. :-(
You can enhance the set of keybindings by placing this file in ~/Library/KeyBindings, which will solve the M-d problem (though not the M-t one):

https://github.com/ppwwyyxx/dotfiles/blob/master/macOS/Libra...

It's a life saver.

Oooo, thank you! Knowing that existed led me to https://developer.apple.com/library/archive/documentation/Co... and https://developer.apple.com/documentation/appkit/nsstandardk...

This leads me to believe that this will work:

    "~t"      = "transposeWords:";               /* M-t */
Edit: Sadly, `transposeWords:` doesn't work, despite showing up in Apple's docs—it just beeps when I try to use it.
I forget about the "control = by character, meta/escape = by word" idea because of that. (Maybe "smaller unit vs. bigger unit" is more accurate? I dunno.)

I don't know what I'd do with that if I were actually an Emacs user, though, since I use the Option key for typing certain characters a fair amount. Although I'm sure I could remap Emacs meta to virtually anything else, because Emacs.

Yeah, there are certain unicode chars that I use a lot because they are convenient: option-; => …, option-shift-dash => —, option-0 => º, option-G => ©, option-M => µ, option-2 => ™, option-+ => ±. But most of the emacs conflicting ones aren't super useful to me, so I think I can live with them gone: ∑ƒ∂˜π∫†ç¬
I have my emacs config set up so that the left Alt key is meta, while the right one retains its original function. Think of it like AltGr on your typical PC keyboard. But I am using Mitsuharu Yamamoto’s Mac port. I don’t know if that is possible using vanilla GNU emacs, since I haven’t used it in years.
> Maybe I'll never get the popularity of doom

Honestly its a double edged sword here. Doom has so many built in convenience functions like `set-font!` and `set-repl!` that an experienced elisp programmer would probably love it for building their own configuration.

On the other hand it bundles so much that an inexperienced emacs user might be more keen to do the bare minimum and rely on the packages bundled with doom to give them all the cool stuff without much effort. After all, why "reinvent the wheel"? I personally don't agree with that sentiment, I think learning how to build and maintain a personal emacs config makes a person a better programmer generally, and makes them prone to reading and writing documentation rather than copying solutions.

I started off with doom and even though I don't use it anymore I still find myself reading its source to figure out how Henrik approached a solution. Love it or hate it, Doom is great in both very good and bad ways for emacs users.

> Doom has so many built in convenience functions like `set-font!` and `set-repl!` that an experienced elisp programmer would probably love it for building their own configuration.

Fair enough, I came from a background of JavaScript and Python, and Lisp was entirely foreign to me, let alone Elisp.

> After all, why "reinvent the wheel"?

I think its not of "reinvent the wheel", but let the other person do the decision making for you, including picking packages, setting up the modeline, so on and so forth. Starting out with a bare Emacs installation, you have to piece together the various packages that you would want to use, where as with Doom, you get everything out of the box. Also, maintaining your own init.el helps one learn Elisp

> I still find myself reading its source to figure out how Henrik approached a solution

For example?

For example the way fonts are implemented in doom is really clean and covers edge cases. I also borrowed the `set-repl` and some code to autoinsert some things. Doom's core modules have a lot of good ideas wrt making configuration easier.
I'd just like to point out that every single one of Doom's modules is optional, and you can install it without any external packages whatsoever (including Evil) if that's what you want.
Which is why I mentioned the convenience functions that come with doom. You're right of course but I wasn't trying to imply that doom couldn't be used as a framework.
Doom Emacs is excellent. I believe you were negatively impressed by the default install, but you can install it without any packages you don't wan't, or any package at all. You can even remove Evil altogether.

You can also easily remove anything afterwards.

Doom is essential for my sanity, and extremely flexible. I can do everything I want, just like on a barebones install. But I do it in a way that is way simpler, more practical, and performant. I'd use Doom even without any of its modules, just for the macros, the speed, and the sane configuration layout.

I tried the build your own route for 2 years, ended up with a huge messy init impossible to maintain. Doom removes a lot of complexity and provides extremely useful macros. The guy really knows what he's doing, and the optimizations that he uses are impressive.

I think doom is really good for inspiration. I used it for a while and it gave me a lot of good ideas on the kinds of things I could do with emacs and elisp.

I now use my own much simpler config, but I've borrowed heavily from the things I like about Doom.

Yes, this is exactly how I use Doom. When I first found it, I transplanted its startup optimizations into my existing config, but left everything else alone. When I look to do something new in Emacs, one of my first instincts is "well, let's see how Doom is doing it."

It's works well because I fall into the Evil+Use-package Emacs hegemony with my custom config.

I had a very similar experience when I decided to learn Emacs recently. The first thing I did was try Doom Emacs. It was nice but I felt that there is this big layer of stuff separating me from having complete control over my editor.

So I deleted my config. Went through the tutorial with vanilla setup. Then I continuously kept adding packages and tinkering with my config. After about two weeks, I felt that my productivity was on par with what it was previously in Neovim.

I've been using Emacs for a couple of months now and I'm happy I went this route. It is a tool I use almost daily and thus having a deep level of understanding and control is worth it.

This is what I did (after brief stint with Spacemacs), only what I did is gradually break apart doom-emacs from inside it, as in remove abstractions and stuff I didn't use until it was a plain (single file) emacs config, then went the other direction with modularisation.

This was very educative and I learned a lot about Emacs and Elisp.

The irony is after all of this I'm back to Vim and I don't feel like going back to Emacs (yet).

Yes, gradually building your own config is a much better approach on the long run. Start lean, learn the basics and add one thing at a time as you learn. Always have complete mastery of your .emacs and understand every line: why it is there, what exactly it does. Never blindly copy random stuff wholesale without understanding it.
I have to say I don't particularly see the wisdom of this (common) view.

It's acceptable to people to use the standard Elisp, and Emacs itself, without digesting that code, but somehow using a canned config is bad. I find the choice of where to draw the dividing line somewhat arbitrary.

If you have spent years writing your own config, you appreciate all the things doom brings to the table. I know I'd never end up writing such a good system from the ground up.