unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* another javascript mode
@ 2008-04-09 18:04 Dan Nicolaescu
  2008-04-09 18:23 ` Lennart Borgman (gmail)
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Dan Nicolaescu @ 2008-04-09 18:04 UTC (permalink / raw)
  To: emacs-devel


A new javascript mode was posted here:

http://code.google.com/p/js2-mode/

We were looking to include a mode for javascript, from the description
this mode seems to be a better candidate for inclusion.
Can someone that uses javascript check it out please?




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: another javascript mode
  2008-04-09 18:04 another javascript mode Dan Nicolaescu
@ 2008-04-09 18:23 ` Lennart Borgman (gmail)
  2008-04-09 19:00   ` Dan Nicolaescu
  2008-04-10 14:21 ` Ted Zlatanov
  2008-04-11  4:14 ` Steve Yegge
  2 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman (gmail) @ 2008-04-09 18:23 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

Dan Nicolaescu wrote:
> A new javascript mode was posted here:
> 
> http://code.google.com/p/js2-mode/
> 
> We were looking to include a mode for javascript, from the description
> this mode seems to be a better candidate for inclusion.
> Can someone that uses javascript check it out please?

I have made some small changes to this to make it use jit-lock/font-lock 
(this is necessary for mumamo). I also changed some defaults.

I have mailed (an earlier version of) my changes to the author. He said 
he will lock at it and come back when he can.

One big promise of this new mode is that it can do completion, but this 
is not yet implemented.

If someone is interested, please mail me.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: another javascript mode
  2008-04-09 18:23 ` Lennart Borgman (gmail)
@ 2008-04-09 19:00   ` Dan Nicolaescu
  2008-04-09 20:46     ` Sebastian Rose
  2008-04-09 22:40     ` Johan Bockgård
  0 siblings, 2 replies; 10+ messages in thread
From: Dan Nicolaescu @ 2008-04-09 19:00 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-devel

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

  > Dan Nicolaescu wrote:
  > > A new javascript mode was posted here:
  > >
  > > http://code.google.com/p/js2-mode/
  > >
  > > We were looking to include a mode for javascript, from the description
  > > this mode seems to be a better candidate for inclusion.
  > > Can someone that uses javascript check it out please?
  > 
  > I have made some small changes to this to make it use
  > jit-lock/font-lock (this is necessary for mumamo). I also changed some
  > defaults.
  > 
  > I have mailed (an earlier version of) my changes to the author. He
  > said he will lock at it and come back when he can.
  > 
  > One big promise of this new mode is that it can do completion, but
  > this is not yet implemented.

Based on what you have seen, should we try to talk to the author to have
this mode included in Emacs?




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: another javascript mode
  2008-04-09 19:00   ` Dan Nicolaescu
@ 2008-04-09 20:46     ` Sebastian Rose
  2008-04-09 22:41       ` Lennart Borgman (gmail)
  2008-04-09 22:40     ` Johan Bockgård
  1 sibling, 1 reply; 10+ messages in thread
From: Sebastian Rose @ 2008-04-09 20:46 UTC (permalink / raw)
  To: [emacs.devel]

[-- Attachment #1: Type: text/plain, Size: 787 bytes --]

Hi,

Just from the first look at it I like this one. I use javascript-mode 
normaly, but js2-mode has much more features like error-checking and 
folding, jump to next error. Works nicely with imenu/speedbar.


A JavaScript mode is something really missing in emacs.



Just one little drawback:

I prefere to have similar faces in all the prog modes I use. E.g. 
js2-constant-face is 'gray', which I hardly can see on white background. 
Normaly I use a different face for constants, that most programming 
modes respect. js2-mode urges me to setup all the faces again just for 
the use of this mode.



Dan Nicolaescu schrieb:
> Based on what you have seen, should we try to talk to the author to have
> this mode included in Emacs?


Would much appreciated here.



Regards, Sebastian

[-- Attachment #2: sebastian_rose.vcf --]
[-- Type: text/x-vcard, Size: 499 bytes --]

begin:vcard
fn:Sebastian Rose
n:Rose;Sebastian
email;internet:sebastian_rose@gmx.de
title:Fachinformatiker/Anwendendungsentwicklung
tel;cell:+49 173 / 83 93 417
note;quoted-printable:Entwicklung  von Internetanwendungen und Programmen  mit  freien  Werkzeu=
	gen  und Bibliotheken.=0D=0A=
	=0D=0A=
	PHP, Java, C/C++,  Bash,  Perl,  Apache, MySQL,  PostgreSQL, xt::commerce=
	, Typo3, Server,  Netzwerk,  Desktop, Datenbank, gtkmm=0D=0A=
	
x-mozilla-html:FALSE
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: another javascript mode
  2008-04-09 22:41       ` Lennart Borgman (gmail)
@ 2008-04-09 21:56         ` Sebastian Rose
  0 siblings, 0 replies; 10+ messages in thread
From: Sebastian Rose @ 2008-04-09 21:56 UTC (permalink / raw)
  To: [emacs.devel]

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

Lennart Borgman (gmail) schrieb:

> There is an option js2-use-font-lock-faces for that (which IMO should 
> default to t).

Great. Got it :)

The default is off though:

"The default is to use faces closer to those of Eclipse and IntelliJ.
For example, Emacs has for some reason decided that comments are red,
which makes them feel rather antagonistic."



Thanks,

Sebastian

[-- Attachment #2: sebastian_rose.vcf --]
[-- Type: text/x-vcard, Size: 499 bytes --]

begin:vcard
fn:Sebastian Rose
n:Rose;Sebastian
email;internet:sebastian_rose@gmx.de
title:Fachinformatiker/Anwendendungsentwicklung
tel;cell:+49 173 / 83 93 417
note;quoted-printable:Entwicklung  von Internetanwendungen und Programmen  mit  freien  Werkzeu=
	gen  und Bibliotheken.=0D=0A=
	=0D=0A=
	PHP, Java, C/C++,  Bash,  Perl,  Apache, MySQL,  PostgreSQL, xt::commerce=
	, Typo3, Server,  Netzwerk,  Desktop, Datenbank, gtkmm=0D=0A=
	
x-mozilla-html:FALSE
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: another javascript mode
  2008-04-09 19:00   ` Dan Nicolaescu
  2008-04-09 20:46     ` Sebastian Rose
@ 2008-04-09 22:40     ` Johan Bockgård
  1 sibling, 0 replies; 10+ messages in thread
From: Johan Bockgård @ 2008-04-09 22:40 UTC (permalink / raw)
  To: emacs-devel

Dan Nicolaescu <dann@ics.uci.edu> writes:

> Based on what you have seen, should we try to talk to the author to
> have this mode included in Emacs?

A comment on the author's own blog said: "I think it's still a long way
(stability-wise, and integration-wise) from inclusion in Emacs. Maybe in
a year or two."

http://steve-yegge.blogspot.com/2008/03/js2-mode-new-javascript-mode-for-emacs.html

-- 
Johan Bockgård





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: another javascript mode
  2008-04-09 20:46     ` Sebastian Rose
@ 2008-04-09 22:41       ` Lennart Borgman (gmail)
  2008-04-09 21:56         ` Sebastian Rose
  0 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman (gmail) @ 2008-04-09 22:41 UTC (permalink / raw)
  To: sebastian_rose; +Cc: [emacs.devel]

Sebastian Rose wrote:
> Hi,
> 
> Just from the first look at it I like this one. I use javascript-mode 
> normaly, but js2-mode has much more features like error-checking and 
> folding, jump to next error. Works nicely with imenu/speedbar.
> 
> 
> A JavaScript mode is something really missing in emacs.
> 
> 
> 
> Just one little drawback:
> 
> I prefere to have similar faces in all the prog modes I use. E.g. 
> js2-constant-face is 'gray', which I hardly can see on white background. 
> Normaly I use a different face for constants, that most programming 
> modes respect. js2-mode urges me to setup all the faces again just for 
> the use of this mode.




There is an option js2-use-font-lock-faces for that (which IMO should 
default to t).




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: another javascript mode
  2008-04-09 18:04 another javascript mode Dan Nicolaescu
  2008-04-09 18:23 ` Lennart Borgman (gmail)
@ 2008-04-10 14:21 ` Ted Zlatanov
  2008-04-11  4:14 ` Steve Yegge
  2 siblings, 0 replies; 10+ messages in thread
From: Ted Zlatanov @ 2008-04-10 14:21 UTC (permalink / raw)
  To: emacs-devel; +Cc: steve.yegge

On Wed, 09 Apr 2008 11:04:25 -0700 Dan Nicolaescu <dann@ics.uci.edu> wrote: 

DN> A new javascript mode was posted here:

DN> http://code.google.com/p/js2-mode/

DN> We were looking to include a mode for javascript, from the description
DN> this mode seems to be a better candidate for inclusion.
DN> Can someone that uses javascript check it out please?

cc-ing Steve Yegge in case he wants to comment...

I do Javascript work and installed js2-mode when it was released.  My
initial comments are on
http://code.google.com/p/js2-mode/wiki/Discussion and the author
addressed them.

- the built-in parser is good at catching most common mistakes,
  especially leaving a trailing comma in a list (very annoying since
  some browsers accept it).  This is really, really nice.

- the indentation guessing (every TAB indents to a different possible
  offset) is annoying to me, even with the patch to require two TABs
  after the first one.  It's inconsistent with what Emacs does in all
  other modes, IMO.  I'd rather take the first guess (and improve the
  code. if it's no good) and invoke subsequent guesses with a secondary
  indent command.

- the pre-compilation requirement is a bit annoying.  I understand the
  idea, but wish it could be automatic.

- it can't currently integrate with mmm-mode, I often need to switch
  from HTML to Javascript to CSS in a typical web page.  Steve Yegge
  says it's not easy in the discussion URL above.  Someone suggested
  mumamo, but I haven't tried that yet.

- auto-update won't be too important if it becomes part of Emacs

Overall, I'd rather use js2-mode than anything else I've tried (and I've
tried at least 4 Javascript modes), primarily for the error highlighting
and the good indentation.  I hope it can go into Emacs.

Ted





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: another javascript mode
  2008-04-09 18:04 another javascript mode Dan Nicolaescu
  2008-04-09 18:23 ` Lennart Borgman (gmail)
  2008-04-10 14:21 ` Ted Zlatanov
@ 2008-04-11  4:14 ` Steve Yegge
  2008-04-11 16:01   ` Dan Nicolaescu
  2 siblings, 1 reply; 10+ messages in thread
From: Steve Yegge @ 2008-04-11  4:14 UTC (permalink / raw)
  To: emacs-devel

Dan Nicolaescu <dann <at> ics.uci.edu> writes:

> 
> 
> A new javascript mode was posted here:
> 
> http://code.google.com/p/js2-mode/
> 
> We were looking to include a mode for javascript, from the description
> this mode seems to be a better candidate for inclusion.
> Can someone that uses javascript check it out please?
> 
> 

I'm not sure about your timeframe, but I would expect that my js2-mode
needs at least another 3 to 4 months before it could be considered for
inclusion.  I only released it a few weeks ago, and people have reported
a wide range of annoyances, incompatibilities, style violations and bugs
that I need to fix.

I'm still actively working on it, so it just needs some time to bake.

If it's something that would need to happen sooner or risk being delayed
a very long time, please let me know and I can bump up the priority of
the work.

Thanks,

-steve





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: another javascript mode
  2008-04-11  4:14 ` Steve Yegge
@ 2008-04-11 16:01   ` Dan Nicolaescu
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Nicolaescu @ 2008-04-11 16:01 UTC (permalink / raw)
  To: Steve Yegge; +Cc: emacs-devel

Steve Yegge <steve.yegge@gmail.com> writes:

  > Dan Nicolaescu <dann <at> ics.uci.edu> writes:
  > 
  > > 
  > > 
  > > A new javascript mode was posted here:
  > > 
  > > http://code.google.com/p/js2-mode/
  > > 
  > > We were looking to include a mode for javascript, from the description
  > > this mode seems to be a better candidate for inclusion.
  > > Can someone that uses javascript check it out please?
  > > 
  > > 
  > 
  > I'm not sure about your timeframe, but I would expect that my js2-mode
  > needs at least another 3 to 4 months before it could be considered for
  > inclusion.  I only released it a few weeks ago, and people have reported
  > a wide range of annoyances, incompatibilities, style violations and bugs
  > that I need to fix.
  > 
  > I'm still actively working on it, so it just needs some time to bake.
  > 
  > If it's something that would need to happen sooner or risk being delayed
  > a very long time, please let me know and I can bump up the priority of
  > the work.

There's a tentative freeze date in June, what that means WRT adding a
javascript mode can probably be discussed with the maintainers.
(In general emacs is a very relaxed community).
Historically modes have been accepted even during the feature freezes.
But emacs is under new management, so policies might change.

But before talking about inclusion, we need to take care of the legal
side: copyright assignments from the authors need to be processed by the
FSF.  If you plan to contribute more to emacs, it is better to get a
copyright assignment that covers future contributions to emacs (i.e. not
only the javascript mode).

It's up to the author to decide when to have code included in emacs, but
the code does not need to be "perfect" to have it included.  If it's
already usable, development can continue after it is included.
There are some advantages of developing code which is included in emacs:
- many people routinely fix issues in various packages
- a large user base
- if bug fixes or features are needed in other places in emacs, it's
easy to fix/ add them.
- access to a large number of highly qualified emacs hackers :-)

Please feel free to ask for more details/clarifications.

Thanks

        --dan




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-04-11 16:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-09 18:04 another javascript mode Dan Nicolaescu
2008-04-09 18:23 ` Lennart Borgman (gmail)
2008-04-09 19:00   ` Dan Nicolaescu
2008-04-09 20:46     ` Sebastian Rose
2008-04-09 22:41       ` Lennart Borgman (gmail)
2008-04-09 21:56         ` Sebastian Rose
2008-04-09 22:40     ` Johan Bockgård
2008-04-10 14:21 ` Ted Zlatanov
2008-04-11  4:14 ` Steve Yegge
2008-04-11 16:01   ` Dan Nicolaescu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).