First Emacs Meetup

Table of Contents

Introduction

Who I am, what I do. What is my history with Emacs (whee Vim convert).

Basic introduction to Emacs

Emacs is a text editor older than I am.

How to install

On OSX, you can use homebrew if you want to install from source, or you can download a build from http://emacsformacosx.com/

$ brew install emacs --cocoa
  • Explain the difference between the different versions of Emacs on OSX

On Linux, you can use the package manager to install it, with either apt (Debian/Ubuntu) or dnf (Fedora), or pacman (Arch).

$ sudo dnf install emacs
- or -
$ sudo apt-get install emacs

For Windows, there is also the Chocolatey package manager, which has Emacs 24.4:

C:\> choco install emacs

Basic terminology

  • Control / Meta
  • Buffer
  • Minibuffer
  • Window
  • Frame

How to learn

Emacs has an included tutorial for basic movement, simply hit C-h t to start the tutorial.

What are other things people would find useful to learn?

Future ideas for presentation

I started working on a list for this at http://writequit.org/denver-emacs/meetup-ideas.html

Major modes, minor modes, packages and how to find/install them

Initialization files

2 different files

~/.emacs.el
~/.emacs.d/init.el <-- I recommend using this one

What are the differences between Major and Minor modes?

Only one major mode at a time (ruby, python, javascript)

You can have many minor modes at the same time (flycheck (syntax checking), flyspell (spellcheck), hideshow, expand-region, whitespace-mode).

M-x describe-mode will list all minor modes for the buffer.

Fundamental mode is "nothing" mode

Sometimes modes have arguments when put in your init.el file, usually a positive number or t mean to unconditionally turn the mode on (instead of toggling it) whereas a negative number means to unconditionally turn it off.

Example:

(whitespace-mode t)
(whitespace-mode -1)
(whitespace-mode 1)

How do you get packages?

"ELPA" - This is the one run my Gnu/RMS, has older packages

"MELPA" - Milkypostman's ELPA, has many more, newer packages

How to install a package

(require 'package) ;; this is include in emacs
(package-initialize)

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

Once you've added those, you can do M-x package-list-packages, use i to mark a package for installation, then x to install it. You can also use u to unmark it.

Packages are installed in the ~/.emacs.d/elpa directory.

Themes

Themes are just like packages

To use a theme, first install it. Then interactively:

M-x load-theme

In init.el (to apply every time you start up):

(load-theme 'leuven t)

Author: Lee Hinman

Created: 2015-09-23 Wed 08:07

Validate