<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[onecolumn,letterpaper,11pt]{article}

%===================================================================
\input{../common_latex_packages}
\input{../common_latex_definitions}
\input{../common_latex_help_format}
%===================================================================

\begin{document}

\begin{labcover}
\labtitle{Help Topic: Getting Emacs in MacOS}
\vspace{0.1in}
\labdate{Spring 2015}
\vspace{0.1in}
\labauth{Michael Benjamin, mikerb@mit.edu}
\labauth{Department of Mechanical Engineering, CSAIL}
\labauth{MIT, Cambridge MA 02139}
\labline
\end{labcover}

\wikidoc{file=Help.EMCGetOSX}
\wikidoc{auth=mikerb@mit.edu}

%====================================================================
\section*{Getting Emacs in MacOS}
%====================================================================

Emacs is a very powerful text editor with support for software
development. We will be using it a lot in 2.680. The first step in
using emacs is getting emacs.  In some cases it is already installed
on your machine. This page describes how to find out for sure whether
you have it installed, and if not, how to get it.

%====================================================================
\subsection*{How to tell if emacs is already installed}

Your machine may already have a version of emacs installed,
with the full path name of /usr/bin/emacs. Verify this:

\vspace{0.15in}
\begin{consoleverb}
 $ which emacs
 /usr/bin/emacs
\end{consoleverb}
\vspace{0.15in}

\noindent
If you get a response like the one above, you're all set. If emacs is
not installed you will get a response like the one below:

\vspace{0.15in}
\begin{consoleverb}
 $ which emacs
 emacs: Command not found
\end{consoleverb}
\vspace{0.15in}

\noindent
If you don't see the love yet, it is most likely because you really don't
have emacs installed. However it is also possible that you simply don't have
\var{/usr/bin/} in your shell path. To rule this out, try the following:

\vspace{0.15in}
\begin{consoleverb}
 $ cd /usr/bin
 $ which ./emacs
 ./emacs
\end{consoleverb}
\vspace{0.15in}

\noindent 
If you see the above, it is simply a matter of adding \var{/usr/bin/}
to your shell path. Do this now, or see the help topic on augmenting
your shell path.

%====================================================================
\subsection*{Installing emacs on the Mac}

Emacs can be installed with the MacPorts package manager.

\vspace{0.15in}
\begin{consoleverb}
 $ sudo port install emacs
\end{consoleverb}
\vspace{0.15in}

\noindent
If you have not installed MacPorts, first see the help page on getting 
started with MacPorts:

\urlxx{http://oceanai.mit.edu/ivpman/help/help-macports}

\noindent
This version will have the binary name "emacs" with a lower-case "e". So you will
see the following on the command line:

\vspace{0.15in}
\begin{consoleverb}
 $ which emacs
 /usr/bin/emacs
\end{consoleverb}
\vspace{0.15in}

\noindent
When you invoke this emacs, it will launch {\em within} the terminal
in which it was invoked. A new window will not open. This is super
convenient for a quick edit of a file. 

\pskip

\noindent
A version of emacs with more graphical front end is also available for OSX.
See the separate help topic:

\urlxx{http://oceanai.mit.edu/ivpman/help/help-emacs-gui}

\end{document}
</pre></body></html>