- new function
gams-align-block' (C-cC-y). By this command, you can align table and other blocks in GAMS code. See Section "Align block" in gams-sample.gms for the details.
- Changed default value of gams-statement-file’ from “~/.gams-statement” to “~/gams-statement.txt”.
- Changed default value of `gams-template-file’ from “~/.gams-template” to “~/gams-template.txt”.
- Minor changes to GAMS-TEMPLATE mode.
On the left side a pane appears with the file structure. In this case the file readdata.gms has two files included: directorysettings.gms and set.gms. It also shows you where you are in the file.
- Start a line with a “*” and write your comment, like
- Put your comment between $ontext and $offtext:
- Put your comment after some code using the end-of-line comment possibility after the two characters “!!”
- 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).
- Choose your version:
- Download the windows installer packages from the Emacs homepage and just double click on it.
- Download the version geared to Windows
- Download a version with some features (in Emacs these are called modes) already prepackaged. A real good one is maintained by Vincent Goulet (http://vgoulet.act.ulaval.ca/en/ressources/emacs/windows). It already contains LaTeX, ESS (Emacs Speaks Statistics for R/S or Stata), windows-printing and some more features. You will find also a good instruction on how to set up Emacs.
- Double click on the downloaded file and install Emacs.
- Emacs wants to have a home directory and we have to tell it where it is.
- First decide where your home directory will be and create it (this can be anywhere on your computer. I have it in my Emacs directory: (c:\program files\emacs\home)
- Define a user variable called home with the full path name of your newly created home directory:
- Go to your system settings – click on the system icon”- click on “advanced settings”. Choose “environmental variables”
- Define a new user variable and call it “HOME”
- The editing facilities of the GAMS IDE are nothing compared to Emacs.
- The Gams Mode in Emacs is heaven on earth for doing Gams coding
- If you write your reports with LaTeX Emacs is probably one of the best editors around .
- For those of you who work with R (statistics) or Stata: Emacs Speaks Statistics (ESS) lets you do your statistics from within Emacs.
- If you write your statistics reports with LaTeX, you can use Sweave allowing you to embed your R-Code in your LaTeX document and let Emacs generate reports while running your analysis, generating graphs and tables for your report at the same time.
- Emacs has many extensions for working with other programming languages (Python, Perl, PHP, etc.).
- Emacs allows you to integrate your versioning system. I use Subversion and can from within Emacs use all commands like commit, update, etc.
- Making quick notes is easy in Emacs: you can generate a note and Emacs adds automatically a hyperlink to the file you are working on. This is a great feature if you want to keep working on the main issues in your model, but don’t want to forget to do some minor tasks. Instead of writing those tasks on a peace of paper of making it a task in Outlook, you can keep on working in Emacs and the next day it is easy to jump back to the place where the task refers to.
- Emacs runs on Windows, Linux and Mac.