Skip to content

Conversation

@d-torrance
Copy link
Member

We now build a tarball and install it using package-install-file. This way, the package files will be byte-compiled and it will appear with the list of other packages that users install from melpa, etc.

@mahrud
Copy link
Member

mahrud commented Jan 13, 2026

What's the advantage here, and are the tests testing anything?

A big disadvantage seems to be that it doesn't work if the user has a variant of emacs installed or if the path to emacs is not known by M2.

@d-torrance
Copy link
Member Author

Several advantages:

  • The .el files are byte-compiled when the package is installed, which will improve performance.
  • It integrates the M2 package with the rest of the emacs package ecosystem. For example, it will appear when running package-list-packages.
  • Consistency with the Debian/Ubuntu package, which has been installing the Emacs package like this for years.

Good point regarding M2 not knowing how to find emacs. Perhaps we could add setupEmacs(String) that the user could use if just emacs doesn't work?

It would definitely be good to test this with several Emacs variants.

@d-torrance d-torrance marked this pull request as draft January 14, 2026 03:32
@mahrud
Copy link
Member

mahrud commented Jan 14, 2026

I don't know what's the idea with the last few commits but I'm highly opposed. M2 documentation doesn't need lisp syntax highlighting ... you can put extra stuff on the wiki if absolutely necessary, but even then I think it's unnecessary.

@d-torrance
Copy link
Member Author

Fair enough -- I guess I did go a bit overboard! I'll remove them.

We now build a tarball and install it using package-install-file.
This way, the package files will be byte-compiled and it will appear
with the list of other packages that users install from melpa, etc.
@d-torrance d-torrance force-pushed the emacs branch 2 times, most recently from 307613d to 09e42ed Compare January 14, 2026 19:51
@d-torrance d-torrance marked this pull request as ready for review January 15, 2026 04:20
@d-torrance
Copy link
Member Author

I think this is ready now. Now, the code in .emacs-Macaulay2 first checks to see if the M2 function is defined (which it should be if package installation was successful). But if not, it falls back to the old behavior of adding the Emacs directory to load-path and loading M2-init.el.

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