running Macaulay 2 in emacs

It is possible simply to run Macaulay 2 in an emacs shell buffer, but since Macaulay 2 makes no effort to wrap lines, it is useful to have commands which make left and right scrolling easier. It is also useful to have dynamic completion of Macaulay 2 symbol names available. These facilities are provided by M2.el .

Install the files emacs/M2.el and emacs/M2-symbols.el in a directory where they can be found by the emacs load command, and insert the line

     (autoload 'M2 "M2" "Run Macaulay 2 in a buffer." t)
in your .emacs initialization file. Execute the command M-x M2 to start Macaulay 2 running in a buffer. The usual method for getting help in emacs on commands available in such a buffer is C-H m .

New emacs commands available in Macaulay 2 buffers:

  • TAB -- dynamic completion of filenames and Macaulay 2 symbols
  • f2 -- position point at center of screen
  • f3 -- move point rightward, keeping it visible by scrolling
  • f4 -- move point leftward, keeping it visible by scrolling
  • f5 -- toggle the truncation of long lines
  • f7 -- scroll window leftwards
  • f8 -- scroll window rightwards
  • New emacs commands available in all buffers:

  • f6 -- send line of text to Macaulay 2
  • The commands are mostly bound to function keys, but that is easily customizable by the user.

    Go to main index.

    Go to concepts index.