Closed d-torrance closed 3 years ago
Also, I think the PPA versions don't install the emacs package at all.
Also, I think the PPA versions don't install the emacs package at all.
They're in the elpa-macaulay2
package, which should be installed automatically unless you don't install Recommends
.
Ah, I see, the problem is that they're being installed in site-lisp/elpa/macaulay2-...
instead of site-lisp/Macaulay2
, so setupEmacs()
isn't putting the correct address in .emacs-Macaulay2
.
Also, why is it prefixed with ELPA and put in that directory at all? It's not a GNU ELPA package (the list is here, and ours isn't among them) at all.
Sorry about hijacking this issue, feel free to move it to a separate issue. I just remembered it when I saw this issue.
Ah, I see, the problem is that they're being installed in
site-lisp/elpa/macaulay2-...
instead ofsite-lisp/Macaulay2
, sosetupEmacs()
isn't putting the correct address in.emacs-Macaulay2
.
That isn't necessary for Emacs packages which are built using the dh_elpa
debhelper addon. M2-mode works out of the box once elpa-macaulay2
is installed.
That isn't necessary for Emacs packages which are built using the dh_elpa debhelper addon. M2-mode works out of the box once elpa-macaulay2 is installed.
I'm getting an error that "M2-init" isn't found, which makes emacs unusable.
Also, why is it prefixed with ELPA and put in that directory at all? It's not a GNU ELPA package (the list is here, and ours isn't among them) at all.
Sorry about hijacking this issue, feel free to move it to a separate issue. I just remembered it when I saw this issue.
It's a naming convention for Debian Emacs packages. I originally called the package emacs-macaulay2
until I was convinced to rename it -- see https://lists.debian.org/debian-science/2020/07/msg00038.html.
That isn't necessary for Emacs packages which are built using the dh_elpa debhelper addon. M2-mode works out of the box once elpa-macaulay2 is installed.
I'm getting an error that "M2-init" isn't found, which makes emacs unusable.
Hrm -- I'll play around with it in a chroot and see if I can reproduce the issue.
Hrm -- I'll play around with it in a chroot and see if I can reproduce the issue.
Sorry, I should be clearer: it works fine in a fresh install of ubuntu/emacs/macaulay2, but if you're upgrading from a previous installation, then it doesn't work. Or if you run setupEmacs()
, it puts the wrong load-path
command there.
To be clear, I think the way your package is doing it is better, I'd be happy to get rid of setupEmacs altogether, but this might cause issues for people who switch to your build.
Hrm -- I'll play around with it in a chroot and see if I can reproduce the issue.
Sorry, I should be clearer: it works fine in a fresh install of ubuntu/emacs/macaulay2, but if you're upgrading from a previous installation, then it doesn't work. Or if you run
setupEmacs()
, it puts the wrongload-path
command there.To be clear, I think the way your package is doing it is better, I'd be happy to get rid of setupEmacs altogether, but this might cause issues for people who switch to your build.
Ok, gotcha. I can probably just patch setupEmacs
to do the right thing or something. Thanks for catching this before 1.17 is packaged!
Ok, I think I reproduced the issue. In a fresh Ubuntu 20.04 chroot, I:
emacs
, and macaulay2
and elpa-macaulay2
from the PPA. At this point, Emacs and M2-mode worked great.setupEmacs()
elpa-macaulay2
.
Warning (initialization): An error occurred while loading `/root/.emacs':
File is missing: Cannot open load file, No such file or directory, M2-init
To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the `--debug-init' option to view a complete error backtrace.
As long as `elpa-macaulay2` is present, then it shouldn't be a problem, as the correct directory will be in `load-path` thanks to `dh_elpa`. But if it's absent, then we'll fail to load `M2-init`.
So a possible fix: patch `setupEmacs()` to
* check if `elpa-macaulay2` package is installed. If so, we're all set. Maybe suggest they make `f12` global.
* If it's not, comment out `(load "M2-init")` in `.emacs-Macaulay2` (if it exists) and alert the user they should install `elpa-macaulay2`.
Thoughts?
Running Macaulay2 (from a PPA build of the
release-1.17
branch) on Ubuntu 20.10 in Emacs 26.3:i1 : infoHelp(rank, Matrix) info: Terminal type 'dumb' is not smart enough to run Info
Doing the same thing from a terminal window opens
info
to the correct documentation page as expected.
I don't see how this could be made to work.
- check if
elpa-macaulay2
package is installed. If so, we're all set. Maybe suggest they makef12
global.- If it's not, comment out
(load "M2-init")
in.emacs-Macaulay2
(if it exists) and alert the user they should installelpa-macaulay2
.
I'd rather the solution wasn't platform specific; e.g., users on macos or fedora can't install elpa-macaulay2. Is it acceptable to add a symlink from the previous location to the new location in elpa-macaulay2?
I'd rather the solution wasn't platform specific; e.g., users on macos or fedora can't install elpa-macaulay2. Is it acceptable to add a symlink from the previous location to the new location in elpa-macaulay2?
Oh, I'm just talking about a patch for the Debian package to fix the issue you ran into -- nothing upstream. Here's what I came up with: https://salsa.debian.org/science-team/macaulay2/-/blob/debian/development/debian/patches/use-dh-elpa.patch
Running Macaulay2 (from a PPA build of the
release-1.17
branch) on Ubuntu 20.10 in Emacs 26.3:Doing the same thing from a terminal window opens
info
to the correct documentation page as expected.