rejeep / nvm.el

Manage Node versions within Emacs
39 stars 25 forks source link

Add interactive function to select node version and comint mode to run node #6

Closed stefano-m closed 8 years ago

stefano-m commented 8 years ago

Hello @rejeep,

based on

I have written an interactive function that allows the user to select a version of node and a major mode derived from comint to run node.

What do you think about integrating it with nvm.el?

I will need some help to add tests, but I am willing to do it if you are interested in merging the code.

The code can be found at

https://notabug.org/stefano-m/.emacs.d/src/master/site-lisp/nodejs.el (note that I am not an Emacs-Lisp expert!)

Thanks,

-- Stefano

rejeep commented 8 years ago

Hey,

I don't think it should be a part of the nvm.el lib, which is a library rather than a package intended for interactive use. If you only want the lib, you should not get all the interactive stuff.

As I see it, there are two different possibilities:

  1. Keep it in a separate repo
  2. Add a new file in this repo, called for example nvm-repl

No matter the solution, they should still be two different EPLA packages.

What would you prefer?

stefano-m commented 8 years ago

Hi,

I see your point.

The stuff I have written has some overlap with js-comint. For me, the advantage is that I can chose any version of node with npm, but my code lacks a lot of functionality (e.g. send-region, etc.).

I was thinking of submitting a PR here so that the code would be properly reviewed and supported. If that's OK with you, I am happy to add a new file to this repo, but I'll probably still need some guidance on testing etc.

On the other hand, maybe that kind of code should go into js-comint instead?

rejeep commented 8 years ago

Hmm, yeah, an option would be to add support for nvm in js-comint, just as rspec-mode has support for rvm. There are probably other examples as well.

stefano-m commented 8 years ago

Cool, I'll try and see if I can get it working with js-comint.

Thanks!

rejeep commented 8 years ago

Sure thing. Let me know when you have something, it seems like an interesting project! :+1: