From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: "Dmitry Gutov" <dgutov@yandex.ru>,
"Simen Heggestøyl" <simenheg@gmail.com>
Cc: jostein@kjonigsen.net, 19946@debbugs.gnu.org, dan.colascione@gmail.com
Subject: bug#19946: 24.4; js-mode, indentation
Date: Sun, 20 Mar 2016 20:01:00 +0100 [thread overview]
Message-ID: <1458500460.1739128.554550090.7C772DCA@webmail.messagingengine.com> (raw)
In-Reply-To: <6420dbed-587e-87e1-e167-73359a65bf6b@yandex.ru>
On Sun, Mar 20, 2016, at 02:27 AM, Dmitry Gutov wrote:
> On 03/20/2016 12:13 AM, Simen Heggestøyl wrote:
> I do not mind, but I'm not sure if we actually want to support this
> usage. There are a lot regexps in lisp/progmodes that use $. There are
> several in js-mode, aside from this one.
>
> Some modes try to match [\r\n] (like CC Mode), but in general they seem
> to be a minority, and even CC Mode doesn't do that consistently.
I really don't see how that argument makes sense.
By following the cardinal rule of good software, that is produce the
least amont of astonishment, cc-mode does what's right: it produces the
expected outcome, no matter what kind of file it's working with.
The result: A happy user.
In my point of view, this should be the aim for all *-modes found in
Emacs, no matter what its current state of affair or conventions is.
The solution to this is either a bunch of hacky patches replacing $ with
\r\n (as above) or actually addressing what's probably the root cause
(as observed by Andreas)
> I wonder why ?\r doesn't have whitespace syntax in the first place.
Make ?\r be interpreted as white-space, because once you put Emacs
outside a GNU/Linux system honestly nothing else makes sense. Is there
any specific reason for its current behaviour?
Or put the other way: Are there known pieces of code which depends on \r
semantically not being white-space to function correctly?
As someone authoring two major modes, every time $ does not work as
expected and I need to write hacks, it breaks my heart. As of now, I
can't really use $ if I want my modes to work and that's just silly (but
at least now I know why).
--
Jostein Kjønigsen
next prev parent reply other threads:[~2016-03-20 19:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 10:09 bug#19946: 24.4; js-mode, indentation Jostein Kjønigsen
2016-03-19 22:13 ` Simen Heggestøyl
2016-03-20 1:27 ` Dmitry Gutov
2016-03-20 8:25 ` Andreas Schwab
2016-03-20 19:01 ` Jostein Kjønigsen [this message]
2016-03-20 19:02 ` Daniel Colascione
2016-03-20 19:15 ` Jostein Kjønigsen
2016-04-03 18:05 ` John Wiegley
2016-04-03 18:17 ` Eli Zaretskii
2016-03-20 19:18 ` Dmitry Gutov
2016-03-20 19:47 ` Jostein Kjønigsen
2016-03-20 19:49 ` Dmitry Gutov
2016-03-21 0:08 ` Daniel Colascione
2016-03-21 0:32 ` Dmitry Gutov
2020-08-25 9:48 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458500460.1739128.554550090.7C772DCA@webmail.messagingengine.com \
--to=jostein@secure.kjonigsen.net \
--cc=19946@debbugs.gnu.org \
--cc=dan.colascione@gmail.com \
--cc=dgutov@yandex.ru \
--cc=jostein@kjonigsen.net \
--cc=simenheg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.