emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Changed list indentation behavior: how to revert?
Date: Sun, 15 Nov 2020 16:26:25 +0300	[thread overview]
Message-ID: <X7EsgKZ3SmkHOORQ@protected.rcdrun.com> (raw)
In-Reply-To: <871rgu7pt9.fsf@gmail.com>

* 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	other threads:[~2020-11-15 19:46 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 17:30 Changed list indentation behavior: how to revert? Karl Voit
2020-11-13 21:10 ` Gustavo Barros
2020-11-13 21:38   ` Jean Louis
2020-11-14  3:02     ` Greg Minshall
2020-11-13 21:47   ` Jean Louis
2020-11-13 22:13     ` Gustavo Barros
2020-11-13 22:21       ` Jean Louis
2020-11-14 17:28         ` Diego Zamboni
2020-11-14 19:10           ` Jean Louis
2020-11-15 12:44             ` Kévin Le Gouguec
2020-11-15 13:26               ` Jean Louis [this message]
2020-11-15 21:59                 ` Kévin Le Gouguec
2020-11-15 22:15                   ` Jean Louis
2020-11-16  7:15                   ` Dr. Arne Babenhauserheide
2020-11-16  6:26               ` Greg Minshall
2020-11-14 10:45   ` Diego Zamboni
2020-11-13 21:31 ` Jean Louis
2020-11-14 22:43 ` David Rogers
2020-11-15  5:38   ` Jean Louis
2020-11-15  7:47     ` David Rogers
2020-11-15  8:54       ` Jean Louis
2020-11-15 10:37       ` Greg Minshall
2020-11-15 11:42         ` Tim Cross
2020-11-15 11:48         ` Gustavo Barros
2020-11-15 11:58           ` Detlef Steuer
2020-11-15 12:09           ` Jean Louis
2020-11-15 14:50             ` Gustavo Barros
2020-11-15 15:11               ` Jean Louis
2020-11-15 10:44       ` Dr. Arne Babenhauserheide
2020-11-15 11:22         ` Detlef Steuer
2020-11-15 14:03           ` Kévin Le Gouguec
2020-11-16  5:24             ` Kyle Meyer
2020-11-16  6:41               ` Tim Cross
2020-11-16  7:15                 ` Tim Cross
2020-11-16 11:21                   ` Gustavo Barros
2020-11-16 23:24                     ` T.F. Torrey
2020-11-17  1:21                       ` Tom Gillespie
2020-11-17  7:01                         ` Dr. Arne Babenhauserheide
2020-11-17  7:48                       ` Michal Politowski
2020-11-19  4:17                     ` Marcel Ventosa
2020-11-16  8:06                 ` Kévin Le Gouguec
2020-11-16 12:10                 ` Bill Burdick
2020-11-16  6:54               ` Greg Minshall
2020-11-16  7:12                 ` Tim Cross
2020-11-17  4:03                   ` Greg Minshall
2020-11-17  5:25                     ` Tim Cross
2020-11-17 13:15                       ` Greg Minshall
2020-11-16  7:01               ` Dr. Arne Babenhauserheide
2020-11-16  7:22                 ` Tim Cross
2020-11-16 16:04                   ` Dr. Arne Babenhauserheide
2020-11-16 16:26                     ` Tom Gillespie
2020-11-16 18:12                       ` gyro funch
2020-11-16 18:48                         ` Tom Gillespie
2020-11-16 19:41                           ` Bill Burdick
2020-11-16 19:56                             ` Tom Gillespie
2020-11-16 21:50                             ` Tim Cross
2020-11-16 23:01                               ` Tom Gillespie
2020-11-16 21:44                           ` Tim Cross
2020-11-16 18:20                       ` gyro funch
2020-11-16 20:56                       ` Tim Cross
2020-11-16 21:35                         ` Bill Burdick
2020-11-16 22:44                         ` Tom Gillespie
2020-11-16 23:55                         ` Dr. Arne Babenhauserheide
2020-11-17  9:05                           ` Stefan Nobis
2020-11-17  9:15                             ` Loris Bennett
2020-11-17  9:32                             ` Diego Zamboni
2020-11-17 14:29                             ` Dr. Arne Babenhauserheide
2020-11-17 16:25                               ` Robert Pluim
2020-11-16 23:39                       ` Dr. Arne Babenhauserheide
2020-11-16 21:35                     ` Tim Cross
2020-11-17  0:11                       ` Dr. Arne Babenhauserheide
2020-11-17  8:45                         ` Detlef Steuer
2020-11-17  9:41                           ` Jean Louis
2020-11-17 15:33                     ` Maxim Nikulin
2020-11-16 13:00                 ` Uwe Brauer
2020-11-16 16:10                   ` Dr. Arne Babenhauserheide

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X7EsgKZ3SmkHOORQ@protected.rcdrun.com \
    --to=bugs@gnu.support \
    --cc=emacs-orgmode@gnu.org \
    --cc=kevin.legouguec@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).