# Notes on Emacs

This is a note on using GNU Emacs on Mac OS X. I used to be a vim user. I also used the sublime text as the main editor, sublime text + skim for LaTeX writing and Typora for Markdown. After Leo showed me the efficiency of using Emacs, I decide to learn it and write down this note. This note will be updated whenever I have time.

## Notations

C- holding the control key while typing other keys

M- holding the Meta key ( option key on Mac) while typing other keys

RET the return key

DEL the backspace key

SPC the space bar

ESC the escape key

TAB the tab key

## LaTeX

A good extension for writing LaTeX is AUCTEX.

#### Install AUCTEX

• In Emacs, M-x list-packages
• mark the auctex package for installation withi
• hit x to execute the installation procedure.

#### Compilation

• open a tex file

C-x C-f your_file_name.tex

• compile in OS X EI Capitan or higher

Since EI Capitan does not allow writing directly to /usr so we need to reconfigure the path for MacTex.

• In terminal, use which latex to find out the location of your latex. For example, on my mac it is /Library/Tex/texbin/latex.

• then open ~/.emacs, add the following to configure the path. Remember to change the path accordingly.

(getenv "PATH")
(setenv "PATH"(concat"/Library/Tex/texbin/" ":"(getenv "PATH")))

• now you can compile the .tex file by C-x C-a and see the generated pdf.

#### Editing

Most useful key bindings can be found at AUCTEX refcard.

To be updated.

To be updated.

## Miscellaneous

To be updated.

The wiki page for Emacs

Very useful cheatsheets typed as reference cards

Last Updated: 2017-07-06