Skip to content

Conversation

@d-torrance
Copy link
Member

@d-torrance d-torrance commented Jan 17, 2026

I submitted a pull request to MELPA (melpa/melpa#9788) to get the Macaulay2 Emacs package included.

For the most part, everything looked good, but there's a big show-stopper: a standard Emacs convention is that package names should be all lower-case. So M2 won't work. However, macaulay2 would be fine.

So in this PR, we:

  • Rename M2.el and M2-symbols.el to macaulay2.el and macaulay2-symbols.el, resp.
  • Change all the M2- prefixes to macaulay2- prefixes.
  • Set up macros so that all the M2-prefixed interactive functions and custom variables will still work (with an "obsolete" warning).
  • The function M2 (now an alias for macaulay2) is still set up as an autoload, since it's the primary entry point for most users. (Although most folks probably use F12 and may be none the wiser if the function name changes.)
  • M2.el still exists, but prints a little warning and then loads macaulay2. (As does M2-mode, which hasn't had any actual code since 2003!)
  • M2-init.el, which is loaded in the .emacs snippet set up by setupEmacs(), still works for setting up the autoloads.

So hopefully, things should work nicely out of the box for most users.

A couple other advantages besides getting in MELPA:

  • Discoverability -- macaulay2 would probably be my first guess of the package name if I didn't know it already.
  • This is consistent with the Debian/Ubuntu package, which also uses the macaulay2 package name.
  • No more occasional clashes with m2-mode, the Modula-2 major mode!

@mahrud @mikestillman @antonleykin: Thoughts?

@d-torrance d-torrance mentioned this pull request Jan 17, 2026
6 tasks
@mahrud
Copy link
Member

mahrud commented Jan 18, 2026

I don't think the benefits are worth the breaking changes and the inconvenience of obsoleting M2- prefixes.

I suggested adding M2-mode to MELPA back in #4 mainly for situations where you might want to have syntax highlighting even without having M2 installed directly on the system (e.g. running M2 on a remote server or via docker). This is only relevant for the experts, so I closed that issue once you added Quelpa instructions in #41, making a MELPA package pointless.

As for the advantages you mention, I don't think many people would run into a Macaulay2 script in the wild, wonder how could they get syntax highlighting for it in Emacs, and decide to search MELPA for it. Also, perhaps Modula-2 should change their mode name, not us :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants