Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Running Singular in Emacs on Windows
PostPosted: Wed Feb 24, 2021 11:45 am 
Hello,

I've been trying to get Singular running in Emacs for quite a while now but I just can't seem to figure out how exactly it is supposed to work. I'm a lifelong Windows user, I have no experience with Linux and I am totally new to both cygwin and Emacs. So basically all I know is the information given on this website (plus some stuff I found on the internet).

I tried both methods described here and both don't seem to work for me.

1) Using ESingular
I use this command in cygwin and I tried around a lot with the option to account for the Error messages it gave me. I came up with the following line

ESingular --emacs=/cygdrive/c/Programme/Emacs/x86_64/bin/emacs.exe --emacs-load=c:/cygwin/usr/share/singular/emacs/.emacs-singular --emacs-dir=c:/cygwin/usr/share/singular/emacs/singular.el

Leaving out the one of the option will result in: 1) Emacs not found 2)&3) "No such file or directory" with either the .emacs-singular or singuler.el file.
The code above results in Emacs starting with the message
Quote:
Loading c:/cygwin/usr/share/singular/emacs/.emacs-singular...
Loading paren...done
Loading c:/cygwin/usr/share/singular/emacs/singular.el (source)...done
Loading c:/cygwin/usr/share/singular/emacs/.emacs-general...done
Loading c:/cygwin/usr/share/singular/emacs/.emacs-singular...done
apply: Spawning child process: Invalid argument


At this point I have no clue what this means and how to continue.


2) Adding code to the .emacs file and using M-x singular in Emacs
I tried to add the code
Code:
(setq load-path (cons "c:/cygwin/usr/share/singular/emacs/.emacs-singular" load-path))
(autoload 'singular "singular"
  "Start Singular using default values." t)
(autoload 'singular-other "singular"
  "Ask for arguments and start Singular." t)

as above and with directory c:/cygwin/usr/share/singular/emacs/ (and some other random choices I came up with because I don't know what I am doing). Both lead to the error
Quote:
Cannot open load file: No such file or directory, singular



What am I doing wrong? I would really love to get both methods to work - or at least one of them (preferably the second).

Thanks in advance!


Report this post
Top
  
Reply with quote  
 Post subject: Re: Running Singular in Emacs on Windows
PostPosted: Wed Feb 24, 2021 9:53 pm 

Joined: Wed May 25, 2005 4:16 pm
Posts: 275
The problem may be the interprocess communication between emacs and Singular
(via signals and pipes). Signals and pipes are UNIX concepts and do not work
(or only with problem) between cygwin programs and non-cygwin programs.
Solution: install an emacs from cygwin (emacs-w32 or emacs-x11, if you have an x1-server).
The calling ESingular should work.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Running Singular in Emacs on Windows
PostPosted: Tue Mar 02, 2021 6:04 pm 
Thanks for the quick answer!

I don't have a x1-server so I triedto look for emacs-w32. According to Emacswiki emacs-w32 is no longer avaiable. The links to the emacs-w32 site lead to some Japanese site that states that the page cannot be found. Am I missing something here?

Also the official Emacs site features a way to install emacs with MSYS2 which is - as far as I understand - something like cygwin. Would it maybe be possible to run Singular/Emacs this way?

And what about the option of running Singular from a running emacs interface. This doesn't use cygwin at all so maybe there is a possibility to get it running this way?


Report this post
Top
  
Reply with quote  
 Post subject: Re: Running Singular in Emacs on Windows
PostPosted: Wed Mar 03, 2021 8:26 pm 

Joined: Wed May 25, 2005 4:16 pm
Posts: 275
No, I meant emacs-w32 from cygwin.
As I explained, the emacs must be a cygwin program as only these programs can communicate "unix-like" with each other.
To get emacs-w32 from cygwin:
- start setup-x86_64.exe from cygwin
- at the "select packages" page, change "View" from "Pending" to "Full", and
put "emacs" into the field "Search"
- from the list of packages, select "emacs-w32" and change the "Skip" to "Install"
- finish with "next","next","finish"


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Running Singular in Emacs on Windows
PostPosted: Wed Mar 10, 2021 5:10 pm 
Everything seems to be working now. Thanks a lot!


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

It is currently Fri May 13, 2022 10:54 am
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group