New update of Gams-Mode (3.6)

There is a update for Gams-mode. It contains some bug fixes and a nice new feature: If you hit C-u C-c C-. you can search for an identifier. It finds the parameter and has several options like jump to the next occurrence, jump to the file, split the screen and also show the file where gams-mode found the parameter. All these possibilities are described at the bottom-line and are self-explaining (“decl” shows the declaration of the identifier).
 
 
 

Formatted code in Word using Emacs

Sometimes I have to write some documentation using Word instead of LaTeX. In LaTeX you have some nice options for typesetting code be it R, Stata or Gams. In Word, however, there is no easy way to format your code. I found a nice way to get my code nicely formatted (in color) using Emacs: I installed the Windows version of Emacs and there I can “Quick Print” – “Preview with Web Browser”. This opens the file as htm in my browser. I now just save this file somewhere on my computer and open it in Word. The text is
Read the rest “Formatted code in Word using Emacs”

More on project management with Org

In one of my posts I talked about org-mode and how I use remember to organize my tasks, calls, etc. For every project I have such an org-file. I now added a file projects.org with all my projects for my different jobs. Here you see my projects for Ecoplan:
 
 
The project entry in this list is linked to my org-file for that project. In Emacs you can add a link by hitting C-u C-c C-l. It asks you for the path to the file and a description. The advantage of this file is that I now have an
Read the rest “More on project management with Org”

Using bookmarks in Emacs

In two of the last posts I talked about moving around in Emacs using the buffer list. Another way of jumping quickly to a buffer is setting a bookmark. A bookmark can be set using C-x r m (for bookmark-set;  for me “m” stands for “make”, so I can remember the difference between the different bookmark commands). Emacs asks for a name and after Enter saves the bookmark.
Moving to a bookmark can be done using C-x r b and entering (the first letters of) the name of the bookmark and use Tab to complete the name.
With C-x r
Read the rest “Using bookmarks in Emacs”

Indenting with Gams-mode

The new version of Gams-mode has a nice feature that helps you in formatting your model.
You can automatically indent GAMS programs according to GAMS syntax.
 
M-C-\        =       Indent region.  Specify region and type M-C-\.
TAB          =       Indent the current line.
 
On the left you see the model before using the indent feature of Gams-mode. I selected the region and typed M-C-\ (`indent-region’).
You can see on the right side what happened. The set and parameter declarations are nicely formatted and the loop is clearly
Read the rest “Indenting with Gams-mode”