Macaulay2 in emacs issue

38 views
Skip to first unread message

KSchwede

unread,
May 17, 2022, 11:50:59 AMMay 17
to Macaulay2
Hi all,
This is probably because I'm running something on a minimal vm in my department, but when our department pulled the latest version of M2 (1.20) on Ubuntu 20.04, and I tried running M2 via [F12] in emacs I get the following error at the bottom of my screen.

"Wrong type argument: commandp, M2"

Playing around in emacs lisp, it appears that emacs doesn't know about the M2 command.  Is there some missing package in this minimal ubuntu install?  

Where is the lisp script I should be loading in emacs typically?

Thanks!

Karl

Daniel R. Grayson

unread,
May 17, 2022, 5:23:16 PMMay 17
to Macaulay2
Try running /usr/bin/M2 in a shell window, and then giving M2 the command "setup()" or "setupEmacs()".  That
will put a file in your home directory and add a line to your .emacs file that calls it.  The result will be that the various
needed functions get loaded and attached to keystroke sequence (the next time you start emacs).


KSchwede

unread,
May 18, 2022, 1:18:06 AMMay 18
to Macaulay2
Hi Dan,

That's the first thing we tried.  We've executed M2 and run setup() in lots of different ways. 

Any other thoughts?

Karl

Doug Torrance

unread,
May 18, 2022, 3:27:26 PMMay 18
to Macaulay2
How was Macaulay2 installed?  If it was using the PPA, then the Emacs files are in a separate package (elpa-macaulay2).  By default, it should be installed alongside macaulay2 and macaulay2-common, but not if apt isn't set up to install "Recommended" packages, which may be the case on a minimal system.

Doug

KSchwede

unread,
May 19, 2022, 11:07:43 AMMay 19
to Macaulay2
Thanks!  Problem solved.  It turned out there were multiple versions of emacs running around.

Daniel R. Grayson

unread,
May 19, 2022, 11:10:19 AMMay 19
to Macaulay2
So how did using the wrong version of emacs prevent it from working?  Was it a version of
emacs that doesn't even load the file ~/.emacs ?


Reply all
Reply to author
Forward
0 new messages