GNU bug report logs - #19946
js-mode indentation with mixed Unix/DOS line endings

Previous Next

Package: emacs;

Reported by: jostein <at> kjonigsen.net

Date: Wed, 25 Feb 2015 16:45:03 UTC

Severity: minor

Tags: wontfix

Found in version 24.4

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Daniel Colascione <dancol <at> dancol.org>, jostein <at> kjonigsen.net, Simen Heggestøyl <simenheg <at> gmail.com>
Cc: Alan Mackenzie <acm <at> muc.de>, 19946 <at> debbugs.gnu.org, dan.colascione <at> gmail.com
Subject: bug#19946: 24.4; js-mode, indentation
Date: Mon, 21 Mar 2016 02:32:38 +0200
On 03/21/2016 02:08 AM, Daniel Colascione wrote:

> It don't have any problem teaching specific modes about carriage
> returns, but this approach doesn't scale.

What about putting that mapping into the standard syntax table?

> A better approach, I think,
> would be to extend something like ws-butler for dealing with
> mixed-line-ending files. On load, we'd transform `\r\n' -> `\n', but
> *remember* which `\n's represent `\r\n` and perform the reverse
> translation when writing. This way, you'd preserve clowny extra carriage
> returns from other people, but see a clean, unified view in Emacs.

And yet another way is to use Git's automatic crlf conversion.




This bug report was last modified 5 years ago.

Previous Next


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