Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 5101

Macaulay2-1.3.1-8.fc15.i686.rpm

<?xml version="1.0" encoding="utf-8" ?>  <!-- for emacs: -*- coding: utf-8 -*- -->
<!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"	 "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>setting up the Macaulay2 emacs interface</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_teaching_spemacs_sphow_spto_spfind_sp__M2-init.el.html">next</a> | <a href="_using_sp__Macaulay2_spwith_spemacs.html">previous</a> | <a href="_teaching_spemacs_sphow_spto_spfind_sp__M2-init.el.html">forward</a> | backward | <a href="_using_sp__Macaulay2_spwith_spemacs.html">up</a> | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div>

    </td>
  </tr>
</table>
<div><a href="index.html" title="">Macaulay2Doc</a> > <a href="_getting_spstarted.html" title="">getting started</a> > <a href="_using_sp__Macaulay2_spwith_spemacs.html" title="">using Macaulay2 with emacs</a> > <a href="_setting_spup_spthe_sp__Macaulay2_spemacs_spinterface.html" title="">setting up the Macaulay2 emacs interface</a></div>
<hr/>
<div><h1>setting up the Macaulay2 emacs interface</h1>
<div><p>If you are a newcomer to emacs, you should spend a few minutes going through the emacs tutorial.  Start up emacs with the command <tt>emacs</tt> and then start up the emacs tutorial with the keystrokes <tt>C-h t</tt>.  (The notation <tt>C-h</tt> indicates that you should type <tt>Control-H</tt>, by holding down the control key, and pressing <tt>H</tt>.)  The emacs tutorial will introduce you to the basic keystrokes useful with emacs.  After running through that you will want to examine the online emacs manual that can be read with <tt>info</tt> mode; you may enter or re-enter that mode with the keystrokes <tt>C-h i</tt>.  </p>
<p>The Macaulay2 emacs interface consists of several files in the directory <tt>share/emacs/site-lisp/</tt> in the Macaulay2 distribution tree.  If you're lucky, then your system administrator has installed Macaulay2 so that directory ends up in the same place where emacs looks for its files, as listed by the emacs variable <tt>loadpath</tt>.  If not, then in order for emacs to be able to find these files, place the following lines in the <tt>.emacs</tt> file in your home directory, creating the file if necessary.  Alternatively, and much simpler, run M2, and let the <a href="_setup__Emacs.html" title="">setupEmacs</a> function do it for you.</p>
<pre>    ;; .emacs file in your home directory
    (load "M2-init")

    ; comment out the following line with an initial semicolon 
    ; if you want to use your f12 key for something else
    ; or change f12 to (for example) f8
    (global-set-key [ f12 ] 'M2)</pre>
<p>After saving your <tt>.emacs</tt> file, try running emacs.  Start Macaulay2 by pressing the f12 function key.  On MacOS X systems, f12 is usurped by either DashBoard, SpotLight, or something else, so either you must change the f12 to some other key, e.g., f8, in the <tt>.emacs</tt> file, or you should disable the systems use of the f12 key.</p>
<p>If Macaulay2 doesn't start up (in a buffer named <tt>*M2*</tt>), check that you typed in the above lines correctly into <tt>.emacs</tt>.  If they look okay, then see <a href="_teaching_spemacs_sphow_spto_spfind_sp__M2-init.el.html" title="">teaching emacs how to find M2-init.el</a>, <a href="_teaching_spemacs_sphow_spto_spfind_sp__M2.html" title="">teaching emacs how to find M2</a>, and <a href="_teaching_spyour_spshell_sphow_spto_spfind_sp__M2.html" title="">teaching your shell how to find M2</a>.</p>
</div>
</div>
</body>
</html>