Content

Thoughts on Modelling and Statistics using Gams, Emacs and Stata or R

Installing Gams-Mode for Emacs

Tuesday 15 June 2010 - Filed under Emacs + GAMS + Gams-Mode

First of all download gams-mode from Shiro Takeda’s website: You will find it here: gams-mode-download.

The files are zipped and should be unzipped to a directory Emacs will find. I show you my settings (as usual, you can do it in an other way).
I have all my additional features in a directory that resides in the Emacs program directory:

 

The full name of the directory is C:\Programme\Emacs\site-lisp\gams. Notice that I don’t call the directory “..\gams-2.7.1″ (the actual version). If there is a new version of gams-mode out, I just drop the files in this directory and I do not have to adjust any settings I make in Emacs. You can see the other modes I use (for example python-mm, ess, planner and auctex).

 
The next thing is to tell Emacs where it can find gams-mode. For this open your “.emacs” (dot-emacs) file that will be in your home directory (see my previous post). If there is no .emacs-file, you just create one.
Add the following text:
 
(setq load-path
   (cons “c:/Programme/Emacs/site-lisp/gams/” ;; Set the installed directory!
     load-path))
(require ‘gams)
 
The first 3 lines tell Emacs where to find gams-mode and the fourth line loads gams-mode.
 
Now you are ready to start using gams-mode. Open a gams-file in Emacs and if all worked fine, you will see the gams-mode menu items (the red arrow in the next picture). In the picture you can also see that I have some features installed that do not come with Emacs (blue arrow). I will talk about that in another post.
 
 
 
In the next post I will tell you something about the great things that you can do with gams-mode and which will make your programming life more relaxed…
 

2010-06-15  »  admin

Share your thoughts

Re: Installing Gams-Mode for Emacs







Tags you can use (optional):
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>