After installing Emacs (see my previous post), the next thing to do is install gams-mode. If you got Emacs running, installing gams-mode is not so difficult.
First of all download gams-mode from Shiro Takeda’s website: You will find it here: gams-mode-download
Update: you can now directly install gams-mode from the package repository:
- Alt-x and type ‘list-packages’
- search for gams-mode
- click on it and install.
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 another 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:
(cons “c:/Programme/Emacs/site-lisp/gams/” ;; Set the installed directory!
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…