mooz / js2-mode

Improved JavaScript editing mode for GNU Emacs
GNU General Public License v3.0
1.33k stars 186 forks source link

Compiling no file when installing js2-mode #296

Closed Txellenne closed 8 years ago

Txellenne commented 8 years ago

I got issues when installing js2-mode (I first tried to just download it and run M-x byte-compile-file but as unsuccessful tried the regular way, trough the package-manager) but still stuck at those warning outputs seen below.. Any help, please??. I'd appreciate it.

issues-j2-mode

dgutov commented 8 years ago

These are just warnings. There's nothing to be stuck at: from what I see on the screenshot, the installation was successful.

(As an aside, the transparency effect makes it rather hard to read).

Txellenne commented 8 years ago

Well, if those warnings do not mean anything, I got clueless. It just that it does not behave as expected..

dgutov commented 8 years ago

It just that it does not behave as expected.

You'll have to be more specific. What did you try to do, and what did you see as a result?

Txellenne commented 8 years ago

e.g.: if I run at command line $ rhino, then this:

js> function square(n) { return n * n; }
js> [1, 2, 3, 4, 5].map(square);

I got js>1,4,9,16,25

If I do that within Emacs I instead got erratic errors, sometimes js: "<stdin>", line xx: Compilation produced 1 syntax errors others ...invalid return

dgutov commented 8 years ago

If I do that within Emacs

You can't simply "do that within Emacs". It's a text editor, not a REPL. You're skipping a lot of steps.

How is that related to js2-mode?

Txellenne commented 8 years ago

I'm trying with a script, js-comint which works on the js2-mode to set an inferior process so a kind of REPL in Emacs.

dgutov commented 8 years ago

Try a newer version, like this one: https://github.com/redguardtoo/js-comint

Txellenne commented 8 years ago

Ah, OK. it works!! (well, so that to make the test short (because I'm still trying only with rhino) I had to comment the first line ;(require 'nvm) in that js-comint version (otherwise, the process leads to incorporate your Emacs system to cask (which leads to a more dependencies checking and in this case I wanted to keep the test isolated). Thank you, very much!!