GNU bug report logs - #20896
25.0.50; [js-mode][FR] support chain syntax indentation

Previous Next

Package: emacs;

Reported by: Rasmus <rasmus <at> gmx.us>

Date: Thu, 25 Jun 2015 15:39:02 UTC

Severity: wishlist

Found in version 25.0.50

Done: Tom Tromey <tom <at> tromey.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Rasmus <rasmus <at> gmx.us>
Subject: bug#20896: closed (done)
Date: Sat, 14 Jan 2017 17:46:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#20896: 25.0.50; [js-mode][FR] support chain syntax indentation

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 20896 <at> debbugs.gnu.org.

-- 
20896: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20896
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Tom Tromey <tom <at> tromey.com>
To: 20896-done <at> debbugs.gnu.org
Subject: done
Date: Sat, 14 Jan 2017 10:45:19 -0700
This was fixed by 502390822f9c0068898ae41285b37568bf0e4d1c.

Tom

[Message part 3 (message/rfc822, inline)]
From: Rasmus <rasmus <at> gmx.us>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; [js-mode][FR] support chain syntax indentation
Date: Thu, 25 Jun 2015 17:37:51 +0200
Hi,

I would be lovely if js-mode would support the chain-syntax used by the
d3.js library.  d3.js is used to making svg graphics.  The syntax is very
readable if indentation is right:


var points = svg.selectAll(".scatter-dots")
               .data(data)
               .enter().append("path")
               .more_funs();
               

var an_axis = axes.append("g")
                  .call(d3.svg.axis()
                          .scale(Scale)
                          .orient("bottom"));
   
Usually calls are factored out so the latter example is not so important
to be able to match.  Just aligning on the first dot on the previous line
would be a big step forward.

I don't know if this is useful for other JS libraries than d3.  Some d3
documentation mentioned this selector-mechanism was inspired by jQuery,
but I don't know this library well enough to say whether it would be
useful with that.

Thanks,
Rasmus

-- 
Not everything that goes around comes back around, you know



This bug report was last modified 8 years and 190 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.