all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Why flip RET and C-j with electric-indent-mode?
@ 2014-12-11 16:56 Stephen
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen @ 2014-12-11 16:56 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org; +Cc: bob@proulx.com

> But no.  That isn't a suggestion I like.  Obviously I already know
> that setting this will set things back the way I prefer:
>
> (setq electric-indent-mode nil) ; new in 24, default is t, breaks RET/C-j

well, no

that disables the electric stuff in its entirety - in c-mode, where i spend a lot of time, you lose the other magic keys (comma, semicolon, parens etc etc)

this is the best workaround i've found:
(global-set-key (kbd "RET") 'electric-newline-and-maybe-indent)

also,

> Because users nowadays expect that.

strikes me as a little arrogant. if by "users" you mean "people who have never used emacs before" then yes. but if you mean "people who have been using emacs for 24 years" then no, i NOT "expect that", get off my lawn!

i don't object to change per se, but i am ticked off there was no obvious documented "old behaviour" flag, and that i had to waste my time coming up with an acceptable workaround for this frivolous change.

s.
 		 	   		  


^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <mailman.14910.1417215406.1147.help-gnu-emacs@gnu.org>]
* Why flip RET and C-j with electric-indent-mode?
@ 2014-11-28 22:56 Bob Proulx
  2014-11-28 23:52 ` Drew Adams
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Bob Proulx @ 2014-11-28 22:56 UTC (permalink / raw)
  To: help-gnu-emacs

So why did emacs flip RET and C-j with electric-indent-mode?  It has
always been that typing RET in fundamental mode would insert a
newline.  C-j would insert a newline and indent.  This is now broken
in emacs24.4 and later.  Now those two actions are reversed!
Aaarrrgghh!

Here is the news entry.

  * Editing Changes in Emacs 24.4

  ** Indentation

  *** `electric-indent-mode' is now enabled by default.
  Typing RET reindents the current line and indents the new line.
  `C-j' inserts a newline but does not indent.  In some programming modes,
  additional characters are electric (eg `{').

  *** New buffer-local `electric-indent-local-mode'.

The change is to set electric-indent-mode all of the time.  Even in
fundamental-mode?  That is a terrible thing to do to users.  Rug.
Standing on rug?  Yank rug!

Bob

The previous online help for RET:

  RET (translated from <return>) runs the command newline, which is an
  interactive compiled Lisp function in `simple.el'.

  It is bound to RET.

  (newline &optional ARG)

  Insert a newline, and move to left margin of the new line if it's
  blank.
  If `use-hard-newlines' is non-nil, the newline is marked with the
  text-property `hard'.
  With ARG, insert that many newlines.
  Call `auto-fill-function' if the current column number is greater
  than the value of `fill-column' and ARG is nil.

In the latest emacs24 RET now does:

  RET runs the command newline, which is an interactive compiled Lisp
  function in `simple.el'.

  It is bound to RET.

  (newline &optional ARG INTERACTIVE)

  Insert a newline, and move to left margin of the new line if it's blank.
  If option `use-hard-newlines' is non-nil, the newline is marked with the
  text-property `hard'.
  With ARG, insert that many newlines.

  If `electric-indent-mode' is enabled, this indents the final new line
  that it adds, and reindents the preceding line.  To just insert
  a newline, use M-x electric-indent-just-newline.

  Calls `auto-fill-function' if the current column number is greater
  than the value of `fill-column' and ARG is nil.
  A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'.



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

end of thread, other threads:[~2016-06-06 22:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-11 16:56 Why flip RET and C-j with electric-indent-mode? Stephen
     [not found] <mailman.14910.1417215406.1147.help-gnu-emacs@gnu.org>
2014-11-29  9:34 ` jfbu
2014-11-30  4:48   ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2014-11-28 22:56 Bob Proulx
2014-11-28 23:52 ` Drew Adams
2014-11-29  7:50 ` Eli Zaretskii
2014-11-29 23:20   ` Bob Proulx
2014-11-30  1:49     ` Drew Adams
     [not found]   ` <mailman.14976.1417303216.1147.help-gnu-emacs@gnu.org>
2016-04-29 17:57     ` jfiocca0
2016-06-03 23:41       ` Bob Proulx
2016-06-06 17:23         ` Jim Fiocca
2016-06-06 22:08           ` Bob Proulx
2014-11-29 12:31 ` Rasmus
2014-11-30  9:59 ` Andreas Röhler

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.