I followed the official documents, but got a error when press F12:
spawning child process: invalid argument
The point is it doesn’t set “Shell” correctly.
By reading M2.el, I find “M2-shell-exe” also need to set.
For example in my computer add
(setq M2-shell-exe “e:/cygwin/bin/bash”)
in to the .emacs file.
Then F12 works.
My setting for Macaulay 2:
;; Macaulay 2
(setq load-path
(append
‘( “e:/M2/usr/share/emacs/site-lisp” )
load-path))
(global-set-key [ f11 ] ‘M2-send-to-program)
(load “M2-init”)
(global-set-key [ f12 ] ‘M2)
(setq M2-exe “e:/M2/usr/bin/M2″)
(setq M2-shell-exe “e:/cygwin/bin/bash”)









