Jean Louis <bugs@gnu.support> writes:
* David Rogers <davidandrewrog...@gmail.com> [2020-11-15 01:44]:
Hello
After reading several of the responses to this, I’ve started to
wonder: Is
electric-indent-mode broken for everybody because it contains a
bug or
design flaw, or is electric-indent-mode working fine but simply
not suitable
for every situation?
In other words, where is the “right” place to fix this problem?
It was working in Org file automatically well and fine.
As if user decides to indent, electric-indent would help the
user:
** HeadingRET
At this point below user may decide to indent:
- First itemRET after RET
^
- the new line appears here
User has to move the cursor to the point shown above for
indentation
to begin. That is good as user decides it and it is text, it is
not
programming language with special convention for indentation.
Electric indent mode always worked like that, including in Org
mode
without any problems.
The change that is introduced in my opinion, and I did not look
into
code, is changing how electric indent mode behaves specifically
for
Org mode as somebody assumes that immediately after headingRET
the new
lines should be indented, like if there is some special
indentation
convention for Org mode.
So without user deciding to indent, it does following:
** HeadingRET
- First line here
But there is no indentation convetion for Org mode of that kind
that I
know.
The Org file shown on https://orgmode.org/ does not follow that
type
of indenting.
Common indenting in Org mode is:
* Heading
Text
** Heading
Text
*** Heading text
Text
**** Heading
Text here
***** Heading
Text
****** Heading
Text
AND if somebody likes to indent differently electric indent mode
would help.
Common indenting is not (other may tell me that I am wrong if
this statement is wrong)
* Heading
Text
** Heading
Text
*** Heading text
Text
**** Heading
Text here
***** Heading
Text
****** Heading
Text
The above change was introduced as default to many users and is
not
conveniente.
Especially not conveniente I find that I need to delete by using
backspace all the spaces inserted that I did not want after
pressing
RET after inserting heading.
Some people will insert ONLY heading as a test without any text.
Thank you! You’ve really explained this clearly, and I understand
your point.
Am I crazy to say that your last example of unwanted behavior is
easier for me to read and understand? (and to me the common
indenting is a hopeless mess?)
But I can see potential problems with it too - a long paragraph on
a narrow screen would become hard to read and edit if there were
very many indent levels. And I have no idea how code blocks would
be affected because I don’t write any real code.
If the new behavior really does what you showed under “Common
indenting is not…”, then I think I prefer the new way for my own
use. And it makes sense to me that it should automatically work
like that. I think the cursor jumping all the way back to the left
margin after I’ve created a multi-starred heading makes no sense.
But I’m also likely to forget to consider things that might go
wrong with implementing a new plan, so I’m not a great judge.
Does the new behavior “break” something for you (causing errors
etc), or does it just look wrong?
--
David Rogers