Hacker News new | past | comments | ask | show | jobs | submit login
Making Emacs Work for Me (zeekat.nl)
110 points by pmoriarty on Nov 30, 2014 | hide | past | favorite | 28 comments



After a long time of maintaining my own configuration I took the decision a few years ago to outsource it to people who really care about this stuff. I started with the Emacs Prelude (http://batsov.com/prelude/) which introduced me to some great tools. I recently switched to Vim bindings (evil-mode) and a week ago switched to Spacemacs (https://github.com/syl20bnr/spacemacs) which integrates better with evil-mode . So far I'm really liking the Spacemacs approach.

tl;dr: Just use one of the packaged Emacs configs unless you really care about this stuff.


Also - don't be surprised if you find out after using one of these prepackaged tools that you really do care about this stuff, and you end up calling bankruptcy on other peoples tools :)


Spacemacs is interesting... it has the idea of additional layers on top of it, might be usable... still will take a lot to pull me away from my well configured vim setup.


Yea, the layering thing is definitely hackable.

I highly suggest using emacs for a specific type of task to try it out, don't go wholesale. Try using it just for taking meeting notes, or maybe only for writing a specific language (skewer-mode / swankjs is a great place to start).

Also, I seriously suggest not starting with evil, but others may disagree. Learning to extend your editor as opposed to configure your editor is a big thing.


I tried emacs for two weeks without evil -- I felt the nagging start of RSI in two weeks. I did rapidly teach me proper coording... but damn, the use of that many modifiers hurts.

I experimented with god-mode, which seems like a good middle, but I am a highly competent 2 decade vim user, the vim keys are virtually hard-coded into my brain.


Yea, I used vim since my father taught me.. which was my majority editor for about 10 years.

The key to not having RSI with something like emacs' modifiers (or any modifiers really) has been the kinesis keyboard where modifiers are the thumbs, and using sticky keys.

Vim or no vim, these are very helpful and I highly recommend.

Evil can be a good place to start, I guess I'm just worried that most beginners would be stuck "configuring" evil instead of extending emacs into whatever works best for you (which may include evil).


I actually own the dual-bowls keyboard. :)

As a contractor working on laptops for years, it never become my "normal" keyboard.


wow spacemacs actually works ! so far this is incredible.

I've tried all these starter packages and there is always some problem that leaves the whole thing unusable.


Here's the source:

https://raw.githubusercontent.com/joodie/emacs-literal-confi...

I've done the same thing with my emacs config, though it's much messier and notably not readable at all.. yet.

https://github.com/codemac/config/blob/master/emacs.d/boot.o...


I do the emacs-config-in-org as well. I also have it auto-compile using a snippet I found on github[1]. Additionally I have git-auto-commit-mode[2] enabled for my emacs config org file, so any time I save the file, it compiles to init.el and then commits those changes automatically. I periodically push to master when I remember.

[1] https://github.com/larstvei/dot-emacs/blob/master/init.org#m...

[2] https://github.com/ryuslash/git-auto-commit-mode


Yea, I just have a separate init.el that:

    - loads ELPA
    - require's org
    - runs (org-babel-load-file (expand-file-name "boot.org" dotfiles-dir))
I've found it much easier than the init.el generation route. It's also much more compatible with custom, though, most of the values set in custom I'd like to get rid of.


If you name it readme.org, then github will render it as html.


Ah very smart. Thanks.


Have you heard of req-package ? a wrapper around use-package that gives helps organizing requirements, configuration and initialization of any given package.

see one instance https://github.com/rejeep/emacs/blob/master/init.el


Uh, just the other day I did a change to my init.el, which is apparently similar to what I'd have done with req-package

https://github.com/berdario/dotfiles/compare/8e98d5569a4caaf...

req-compare is cleaner, but otoh I have a different use case: the rationale for my change was to avoid errors when package installation fails (due to lack of network, for example... it might happen if I synced the init.el changes earlier without opening Emacs), while still executing all the other packages configuration/initialization steps


I've never even used use-package..

Is this just to eliminate dependency ordering? With things like package-initialize, most every package in my system is autoloaded before any of my init.el really runs.

It's a nice visual structure to look at, though, that's for sure.


That is one part of it, but it has a lot of other benefits too. I recently switched to using use-package to do all my package installation and configuration, and my emacs-init-time improved dramatically because use-package can set up smart deferring of loading based on commands or bindings. It's worth having a read through the repo readme: https://github.com/jwiegley/use-package

As an example here's my package init using use-package: https://github.com/stafu/.emacs.d/blob/master/init/init-pack...


I think it also ensure installation on first require so you don't have to pre-install then configure. req-package adds some runtime dependency yeah, I don't use it as for now though.


While we're at it. Here's the emacs config used in the notorious "Emacs Rocks" screencasts on http://emacsrocks.com/:

https://github.com/magnars/.emacs.d

I haven't messed with my emacs setup once since I installed this collection of emacs plugins a couple of years ago.


I've seen at least two similar pages - with people's configs as Org files, written in a kind of literate programming style, but I can't find them right now, unfortunately. It would be good to have them all in one place, I think, as this is a very good format for learning Emacs.


My .emacs is nothing to be proud of, but as it happens I have it in .org format on the web: https://github.com/rodw/.dotfiles/blob/master/emacs/.rods-do...

Here are some .emacs.org files from more sophisticated emacs users:

* Sacha Chua - http://pages.sachachua.com/.emacs.d/Sacha.html

* Arnaud Legrand - http://mescal.imag.fr/membres/arnaud.legrand/misc/init.php


Please, add few screen shots of your emacs


That would have made this article so much more useful to me.

Without screenshots it was difficult to see why I might want one of these plugins.

It would also have been nice to have some written motivation for using them, as well as a description of what they do and the problem they solve.


That's a very good idea! I feel that, to some extent, screenshot could replace lengthy explanations weaved through the code in configs similar to the linked one...

I have quite a lot of custom Elisp in my config - more than 1.5k loc - and it's well commented and should be readable, but it lacks any commentary/narrative which is what makes reading things like this interesting. Would you like to read it if I added a little bit of additional text and a screenshot for every larger section of the config?

I think I'll try doing this - I'm poor at writing and it takes me way longer to describe something well than just creating a screenshot.


That configuration is really awesome: talking from experience.

Joost is our lead developer (we're Studyflow, a small edu-tech startup in Amsterdam which use Clojure/Clojurescript with Om + CQRS and Event Sourcing) and when I switched from Vim to Emacs it was incredibly good.

In my fork I put the custom.el that makes it look like this when editing Clojure files and having magit diff.

http://cl.ly/image/0B3L3u3y3b2D


I maintain a version of the Emacs Starter Kit using Org-mode and Babel. It is similar to this setup if a little bit more involved.

- Org-mode exported HTML: http://eschulte.github.io/emacs24-starter-kit/

- Git repo: https://github.com/eschulte/emacs24-starter-kit/


I was persuaded to try prelude: http://batsov.com/prelude/

never looked back.


My Emacs configuration is based on Sacha Chua's, with some things added and removed.

https://github.com/bashrc/emacs




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

Search: