1. 32
  1.  

  2. 9

    As an Emacs user for the past 20 years, I have my little tidbits of advice for getting into it. (For the record, the stuff in the post is fine, but it’s clearly a new user’s advice. ;)

    1. Learn the defaults, and avoid excessive keybinding customizations. With all the modes that exist and all the movement commands, if you start changing things – especially with global-set-key – you can be in for a rough ride.
    2. By the same token, avoid starter kits (as mentioned by @vfoley elsewhere). They tend to add a lot and make the basic documentation less meaningful.
    3. Spend the time to read documentation. Every now and then pick a mode or subsystem that seems interesting, read the docs, see what it can do, and see how you want to use it. Some things like M-x calc are entire worlds unto themselves.
    4. Customize later, and not too much. Once you know a bit about what it is you’re working with, then start changing things. I recommend learning to navigate with the defaults before changing things as it grounds you to the documentation more, and if you don’t have your customizations with you on another machine, you can get confused.
    5. Get familiar with the functions, not just the key commands. This will help you immensely. If you know that you’re executing forward-sexp when you hit C-M-f, then in a pinch, you can still execute it if the keybinding goes away for some reason.
    6. Learn the help commands. describe-key and where-is are your friends.
    7. Don’t be afraid to read the source. I resisted this for too long. Not everything is documented well. Sometimes, to understand the nuances of a mode for customization purposes, you have to dig around in the source.
    8. Once you’re a little comfortable with Emacs, then dive into Elisp.

    The only thing you may want to customize right away is a theme. The default colours can be gaudy and stark. If you pick one of the solarized themes (light or dark), then you’ll probably be just fine. Along the same lines, I’d avoid excessive ornamentation, but that’s me.

    1. 3

      Your points can be copied and pasted into a comment related to Vim editor as well. I’ve learned most of them the hard way, started to configure too much too soon, only to find myself reverting to the defaults more and more.

    2. 5

      Yay another Emacs user!

      Although I really like his empathy, I – personally – do not think that org-mode is that great in the long run. It lead my way to Emacs itself, but I was never really able to set up a system that I would stick with. There is a lot of documentation for it out there (printing this page will result in a 96 page document) but configuring it to your every need is a big task. Maybe it’s the fault of the editor because it allows you to turn pretty much every knob there is and org-mode offers just too many.

      Still, org-mode does attract quite a lot of users which will then stick with the editor so that’s a point in favor of it.

      1. 13

        Like shanemhansen I too used Org mode just as a “better markdown” for a while, but started getting into Org mode a bit more by watching Rainer’s Youtube Org-mode tutorials. I am now at a level where I have capture template for “weekly reviews”, and even have a separate capture template for new invoices… that I process into PDF via LaTeX. I still refer to the manual quite often, it has to be said. I used Org Babel to write executable runbooks, and I maintain my blog as an Org publishing project. I… may need an intervention.

        1. 4

          Actually sections of my teams playbooks were executable org mode things that I exported to confluence markdown. Design docs are usually in org mode (with inline graphviz/dot file images). It’s really awesome.

          I started blogging using org mode. I was exporting org to markdown for hugo, but then the author of this article (Chase Adams) added native org support to hugo. Markdown is just a tad too simple for me, but org mode is perfect for lightweight structured docs with some code samples.

          I’ve started doing presentations in org mode using a reveal.js plugin.

          and I haven’t even gotten into capture templates or time tracking.

          1. [Comment removed by author]

            1. 2

              There are things I haven’t done, such as Jira and Confluence integration

              I’ve come to love the shell a hell of a lot. I implemented a Jira CLI thing for my own use, which has EDITOR support, and if I were to have an editor-compatible “confluence” thing, it’d be an EDITOR-compatible thing. What I mean to say is, I miss Acme. There’s a few things that really annoy me about it, but its integration with the system is just fantastic. I think one of the key parts is the plumber; you can do really awesome stuff with that thing. Thing on your screen looks like a Jira ticket number? Right-click, and you got a Jira ticket details. And then I had special formatting for my Jira thing that would output shell commands that I could just execute from Acme by highlighting them. Glorious.

          2. 5

            I disagree. The fact that org mode is configurable doesn’t mean you need to configure it. I haven’t configured org mode at all.

            Maybe this is a bad analogy but to me it’s a bit like C++. You can use it as a “better markdown” and you can keep using more features until you’re using it to produce reproducible scientific papers or do devops.

            This is what most of my org mode files look like

            * Title
            ** Subtitle
            **** TODO task
            - some
            - stuff
            

            I’ve never felt the need to configure it.

            1. 4

              I’ve been trying org-mode on and off for the three years I’ve been using Emacs (switched from vim). I haven’t managed to stick to it for longer than a couple months, it truly is too powerful, it’s overwhelming for me.

              I read several articles about how great Emacs is (which is true, of course!) and the comments will always have mentions to Org, but I haven’t really seen many good long-form articles about their org workflow. If anyone in this thread would share theirs, I’d be super grateful ;)

            2. 2

              If you want a great “starter pack” for Emacs, I’ve looked at a bunch, and Prelude is by far my favorite one.

              Emacs Redux is also a great blog where you can learn and pick up neat tricks.

              1. 7

                I would avoid heavy starter kits; they add quite a lot and customize Emacs significantly, and it can be more work to undo the choices they made than to add the configurations that you need.

                Rather, I encourage people to scour for emacs.d repositories on github: many are very well commented, and you can easily start grabbing things that interest you.

                1. 2

                  I dunno. I agree with the sentiment, but some of the default Emacs settings are really quite off-putting, and could give beginners a poor first impression. (Littering your disk with backup files & the shitty way buffer names for files with identical names are uniqified comes to mind) so I think it could make sense to use starter kits when you start out and then ditch it and grab just the bits you need / want from the kit. Of course I’m biased, because it’s what I did :-)

                  For what it’s worth, I used the “better defaults” package.

                  1. 1

                    That’s the neat thing about Prelude, unlike other kits it’s not heavy at all.

                2. 1

                  Is there a compelling reason for a Vim user to switch?

                  I really don’t want to start an editor flame war here, but I’m genuinely curious about the advantages it might bring if I switch.

                  1. 3

                    I was a vim user for around 15 years. I still “think” in vim motions. I switched to Spacemacs using the vim-style keybindings afforded by evil-mode. I had a very extensively customized .vimrc and .vim (you know it’s serious when you use a directory) and used various “slime” modes over the years (vim-slime was my last one) to integrate a copy/paste into other tmux panes. I maintained a lot of custom code to enable an integrated repl experience for the languages I used the most (editing sql and testing with psql/sqlite3; editing python and interacting with ipython; editing clojure and interacting with the clojure repl). I had a fancy Unite-based workflow for file-finding and project management.

                    In short, everything I had customized was implemented out of the box on Spacemacs. I enabled modes for the languages I used (clojure, python, sql, html, javascript) and it all just kinda works. git/gist integration just works. The motions I used worked. It was very easy to figure out how to make an evil operator for executing code and then use that + motions to emulate the fine-grained selection I had become accustomed to with vim-sexp/vim-sexp-mappings-for-regular-people/surround.vim + tmux. The best thing was a ton of functionality was unlocked for clojure/python thanks to modes already being integrated and built. I could stop maintaining my vim installation and focus on other issues.

                    Some highlights for Spacemacs for someone whose only experience with emacs was knowing how to kill it (the wrong way mind you; C-z into pkill -9 emacs).

                    • Spacemacs is discoverable. The leader key is Space and once you hit that, a menu pops up with completions. In fact, these completions pop up whenever you start a key chord. They default to waiting 0.4 seconds, but I overrode that in the .spacemacs config file to be 0.1 second. This is awesome when you don’t know emacs. (This functionality is called helm and which-key).
                    • Spacemacs is curated. I didn’t know what the git interface in emacs is (magit if you’re curious). If I would have had to spend months copy/pasting/tweaking elisp I found online to get half of what I spent 15 years acquiring in vim, I would have never switched. In Spacemacs SPC shows that g is for git and then you see a bunch of actions explained. This is easy.
                    • Spacemacs is a very complete vim experience. Registers work. Macros work. The motions you expect work. You can use operators and define new ones. Your chords will basically work. The difference is that you can jump to the source code and use an elisp debugger inline in Spacemacs. This is pretty awesome for discovering/tweaking once you find something you want to change. elisp is in a lot of ways similarly high level like Python, Ruby, or Lua. You don’t have to “grok Lisp” to make some useful changes
                    • Spacemacs has decent documentation. In addition to SPC h which has a bunch of emacs builtin help/documentation, there is a full Read the Docs and each layer documents its shortcuts.
                    • Spacemacs has “Layers” which make it easy to add more curated sets of things so you can learn a piece at a time and have nice entry points for extension and learning the underlying system. Layers are sets of emacs packages and associated configuration/integration into the spacemacs ecosystem.
                    • Spacemacs is easy to configure. Most of what you need to do is encompassed in editing a heavily commented .spacemacs file that is well documented on the read the docs website. You can largely avoid copying/pasting random elisp snippets.
                    1. 2

                      I’ve been using vim very heavily for about 10 years now and I’m currently a week into trying out a switch to emacs.

                      The main thing I like is honestly that things look way nicer - my switch was fed mainly by frustration with weird terminal UI issues, but has been sustained by 1) evil-mode means I can keep my vim editing ways, 2) plugins like magit that are just so much more feature-rich & polished, and 3) Emacs lisp is much nicer to use than vimscript.

                    2. -1

                      Emacs is a pretty good operating system. I just wish it had a decent text editor. ;)

                      1. 4

                        As the post notes, it can be extended to include one: https://github.com/emacs-evil/evil

                        http://spacemacs.org/ is worth checking out too!

                        1. 4

                          I know you’re joking, but I can’t help but mention you can run M-x term and fire up nano/vim.