Emacs Intro

We've avoided it for a hundred episodes now, but the time has finally come to talk about that other text editor. Join Chris and Harry as they dive into the wild world of Emacs and see what things look like on the other side of the aisle.

This is a companion discussion topic for the original entry at https://thoughtbot.com/upcase/videos/emacs-intro

One thing I’ve wanted in Vim (although haven’t looked very hard) that I’ve seen Avdi Grimm use (not sure whether it’s native emacs or not) in some how his screencasts is the ability to evaluate Ruby inline and on the fly. He has a keybinding that will evaluate a line and add an inline comment, e.g. # => <result>

Also, bring Harry back more often! I enjoy the dynamics between you two.

I believe Avdi is using the gem https://github.com/JoshCheek/seeing_is_believing, haven’t tried to set this up myself though.

Aww, thanks!

I think that Avdi’s still using xmpfilter from the rcodetools gem. He actually did a free RubyTapas episode about it a couple years ago.

I’ve used it in Emacs before (following his instructions, I think) and it worked very well. He mentioned that the gem also ships with an rcodetools.vim, which you might find useful!

I mainly use Atom, but dip into vim occasionally with basic competence; I’m intrigued enough to try emacs thanks to your video intro.

Do you have a recommended package manager or way to install magit etc?

As of version 24 (which is a few years old), Emacs has a built-in package manager! It can be configured to use multiple package repositories. I think it includes the standard GNU repo (“ELPA”) by default, but you’ll probably want to add MELPA, which is the most popular and includes Magit. Add this to your .emacs (or .emacs.d/init.el, if you like directories):

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages"))

You’ll need to refresh your local list of available packages after adding an archive. Do that with M-x package-refresh-contents.

You can now list all the available packages with M-x package-list-packages, which provides an interactive menu system to find and install packages. You can also install packages directly (i.e., without the menu system) with M-x package-install.

There are more instructions about getting started with MELPA over at their getting started page.

Thanks Harry, Not found the time to dig in properly yet, but hope to in the coming weeks.

Thanks for the tour, Harry! I’ve been emacs-curious ever since seeing evil-mode in action, but I haven’t made much progress to date.

In Vim, I know where the relevant configuration/source files (vimrc, runtimepath) live. I also know how to navigate and search within Vim’s help system; an important part of that knowledge is familiarity with terminology conventions like :ex-command, function(), 'option'. Knowing where the relevant files live and how to use the help system effectively has given me a tremendous leg up with Vim, and I imagine the same would apply to learning emacs.

Do you know where I might find an introduction to those topics that doesn’t assume the reader is already very familiar with emacs? I’ve found lots of articles covering basic keybindings, but not so many on the “lay of the land”.

It would also be interesting to know which modern keys most emacs users use for meta, super, hyper, etc.

Oh, and I’m super jealous of emacs’ incremental search. Slick!