emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changed list indentation behavior: how to revert?


From: Jean Louis
Subject: Re: Changed list indentation behavior: how to revert?
Date: Sun, 15 Nov 2020 16:26:25 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* Kévin Le Gouguec <kevin.legouguec@gmail.com> [2020-11-15 15:45]:
:PROPERTIES:
:CREATED:  [2020-11-15 Sun 16:26]
:ID:       e454756a-3123-42dc-8c44-8682f12927ad
:END:
> Jean Louis <bugs@gnu.support> writes:
> 
> > Indentation in fundamental mode:
> >
> > ** HereRET
> > I come here.
> > But only if I start indenting
> >    Like hereRET
> >    Then I continue here
> 
> Hi Jean,
> 
> My understanding of electric-indent-mode is that it tries to make "RET"
> equivalent to "insert newline; indent according to major mode rules".
> E.g. in c-mode, when point is after the brace:
> 
> if (condition) {
> 
> RET will move point to column 2, while C-j will just insert a newline
> and stay at column 0.

> Likewise in python-mode, when point is after the colon:
> 
> def foobar():
> 
> RET will insert a newline and move point to column 4; C-j will stay at
> column 0.
> 
> Your counter-example in fundamental-mode only shows that there are no
> "smart indentation" rules in this mode; hitting TAB more than once keeps
> on inserting horizontal space unconditionally instead of snapping to the
> "correct" indentation level.

I know it behaves different in different modes.

And there is also to consider (which I did not test in many modes)
that in majority of modes not being programming language user may move
either with TAB or SPC to any column and RET will be aligned to begin
of that previous line.

      anywhere
      this lines alignes with the first one

Which is generally good think.

There is just slight difference, and that is what I learned from
introduction to Org mode that it is "plain text" kind of mode. I can
do and write how I wish. My habit comes from being used to indent when
I want and then to follow indentation in that specific paragraph. That
is really great.

But I was not used to have it indented by programmer like the
introduction of this new default feature, which I consider is not
useful to be default.

> I've used Emacs's programming language modes for years before finally
> trying out Org, where I noticed that the keys were swapped: RET was the
> "plain dumb newline" key, and C-j was the "smart newline-then-indent"
> key.  IIUC this was how the rest of Emacs behaved before
> electric-indent-mode became enabled by default.
> 
> I personally found the difference infuriating.  Everywhere else in
> Emacs,
> - C-m and <Return> do smart indentation,
> - C-j ≡ ^J ≡ (insert "\N{LINE FEED (LF)}")

I understand it for you, you got also surprised as you were used to it.

> The changes in Org 9.4 aimed to make Org consistent with this "new"
> convention, so that hitting RET immediately indents paragraphs below a
> heading (as if the user hit TAB right after inserting a newline), and a
> user wishing to "just insert some vertical space" can just whale on
> C-j.

Somehow I protest against it as it is not what I learned from roots of
Org writing, so introducing it as default is breaking habits and
consistency.

Observe this official presentation and you will see how current
indentation is not consistent to what is shown:
https://orgmode.org/resources/img/features/folding.gif

Look at this official presentation and you will see that even headings
are indented for which we say it should not be so:
https://orgmode.org/resources/img/features/clocking.svg

The official presentation here:
https://orgmode.org/

does not show any indentation at all.

And in Info file I find nothing of it.

All I say, when default is introduced, should be well documented how
and why. Before it is introduced it is better to discuss wider with
people.

Few of people reading these exchanges may find how to turn it off,
majority will not find it.

> FWIW, what I wonder about is /why/ Org hard-indents section bodies by
> default (org-indent-mode, which I use, soft-indents instead using
> overlays).
> 
> IIUC this can be toggled off by setting org-adapt-indentation to nil;
> FWIW this is what the .dir-locals.el file at the root of Org's
> repository doe

With 2000+ directories containing Org file of persons, held on this
system that would mean turning it on 2000+ times. Because in general I
do not use that type of indentation I have just set it in main
~/.emacs.d/init.el file.

We concluded that configuring is easy and that is great.

What is not concluded is that the default impacts too many people who
may not find out how to configure it back and that designing user
interface shall be made with more care.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]