sagemath / sage-shell-mode

Emacs front end for SageMath
GNU General Public License v3.0
98 stars 16 forks source link

Spacemacs integration #6

Open alejandroerickson opened 8 years ago

alejandroerickson commented 8 years ago

I've started to integrate the sage stuff into spacemacs. If you are familiar I invite you to comment on my configuration, found in packages.el here: https://github.com/alejandroerickson/spacemacs/tree/myconfig/layers/%2Blang/sagemath

stakemori commented 8 years ago

Thank you for trying to write a layer for SageMath. I think it is a very good attempt. I don't know spacemacs very well, but the following are some thoughts.

  1. You don't have to install both of sage-mode and sage-shell-mode. You can use these two packages simultaneously. But there exist some conflicts of key-bindings between them.
  2. The initial state for sage-shell-mode (a major mode for Sage repl) should be the insert state or the emacs state. You can set the initial state of evil for a mode by evil-set-initial-state.
  3. I wrote some extensions for sage-shell-mode (e.g. auto-complete-sage, helm-sage, ob-sagemath). It would be nice if these packages could be available in the layer.
alejandroerickson commented 8 years ago

Great! Yeah, I saw that sage-mode is more or less subsumed by sage-shell-mode. I chose helm-sage over auto-complete-sage because I think it is used more broadly, being an integral part of Spacemacs. Does it offer anything that you can't get from helm-sage?

I have not explored ob-sagemath yet, but I will include it.

gvol commented 8 years ago

Hmm. I wouldn't say that sage-mode is necessarily subsumed by sage-shell-mode. AFAIK, there are still (important) things that sage-mode does that sage-shell-mode doesn't: https://wiki.sagemath.org/SageModeComparison

Though it may be that things have changed since I wrote that page--I haven't been too active lately since I don't use Sage much anymore.

stakemori commented 8 years ago

Does it offer anything that you can't get from helm-sage?

  1. auto-complete-sage shows popup help when a completion candidate is selected (screenshot). But this feature is turned off by default because it is slow.
  2. By default helm-sage does not show completion candidates which start with the underscore _, i.e. it does not show internal or special methods such as __add__, __eq__. By setting helm-sage-candidate-regexp as below, it will show all completion candidates.
   (setq helm-sage-candidate-regexp (rx (1+ (or alnum "_"))))

For what it's worth, I wrote a company-backend for Sage, though it is not available from MELPA.

@gvol, one important thing sage-shell-mode doesn't have is inline display of graphs and LaTeX images (#5). Unfortunately, I don't have enough time to implement it these days (But I use Sage and sage-shell-mode almost everyday).

iromise commented 6 years ago

@alejandroerickson are you still working on it?

btljuice commented 6 years ago

Hi all,

I have on my end, taken @alejandroerickson layer proposal in my private directory, and just made a few modifications: https://github.com/btljuice/dotfiles/blob/master/.emacs.d/private/sagemath/packages.el

I have taken out the sage-mode package and changed a few keybindings here and there. It works pretty well out-of-the-box, but certainly needs some polish.

If there is still some interest into bringing this layer integrated into spacemacs, I'm willing to put some effort to improve it to a suitable state for a proper pull request. But I'd need a bit of help. I'm a fairly good programmer, but I'm far from an elisp + emacs + spacemacs expert.

First of here's a todo checklist of what is probably left to be done:

If there's any point I might be missing or some pointers that could help me out, let me know.

vv111y commented 5 years ago

@alejandroerickson @btljuice How is it with your private layers? Are either of you using it and does it work well? What about submitting a PR for spacemacs repo?

alejandroerickson commented 5 years ago

Not using or maintaining them anymore because I no longer use sagemath or emms. Sorry!

On Mon, 10 Dec 2018 at 13:06, vv111y notifications@github.com wrote:

@alejandroerickson https://github.com/alejandroerickson @btljuice https://github.com/btljuice How is it with your private layers? Are either of you using it and does it work well? What about submitting a PR for spacemacs repo?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sagemath/sage-shell-mode/issues/6#issuecomment-445972910, or mute the thread https://github.com/notifications/unsubscribe-auth/AF1zUGrjmI1ibE8i895L-5Xa7SLSWFHbks5u3szVgaJpZM4I8sWW .

-- Software Developer at Copperleaf, Vancouver, Canada phone: +1 778 840-0267 http://alejandroerickson.com