All you need probably is calling C-j, not RET
There is certain confusion IMO in recent design, as
C-j is bound to electric-newline-and-maybe-indent
which works as I would expect from newline.
On 02.08.19 07:08, Jarosław Rzeszótko
Perhaps this behavior exists because there can also be a
situation like this:
[cursor, on empty line in middle of indented block]
where what electric indent does after pressing RET
(creates new line aligned to the print statements) makes
sense. I think it is mostly irritating though, and editors
I tested, Vim and Sublime Text, do not automatically
indent in any of the situations I mentioned.
FWIW this works as a workaround for me:
(when (eq major-mode 'python-mode)
;; Do not auto-indent after inserting any empty
Andreas Röhler <address@hidden>
> AFAIU electric-indent-mode doesn't run a timer, cursor
> would not trigger it.
electric-indent-mode works from post-self-insert-hook. Not
cursor position and timers are related.