emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [POLL] Setting `org-adapt-indentation' to nil by default?


From: Tim Cross
Subject: Re: [POLL] Setting `org-adapt-indentation' to nil by default?
Date: Mon, 03 May 2021 08:25:24 +1000
User-agent: mu4e 1.5.12; emacs 28.0.50

Jean Louis <bugs@gnu.support> writes:

> * Tim Cross <theophilusx@gmail.com> [2021-05-02 11:52]:
>> 
>> Jean Louis <bugs@gnu.support> writes:
>> 
>> > * Bastien <bzg@gnu.org> [2021-05-02 09:10]:
>> >> Various discussions convinced me that `org-adapt-indentation' should
>> >> be nil by default.
>> >> 
>> >> With `electric-indent-mode' being activated by default in Emacs, the
>> >> current behavior is that RET after a headline moves the point below
>> >> the beginning of this headline, not the beginning of the line, which
>> >> might surprise users.
>> >> 
>> >> Indentation is quite sensitive: what do you think of setting a new
>> >> default value of nil for `org-adapt-indentation' in Org 9.5?
>> >
>> > Yes, it should be nil just as it was in beginning.
>> >
>> > But there is one problem that I encountered since that was introduced,
>> > namely I do like properties being indented under the first letter of
>> > heading or on 3rd place.
>> >
>> > Like this below, however, C-c C-x p will create properties indented
>> > only if org-adapt-indentation is t
>> >
>> > * Heading
>> >   :PROPERTIES:
>> >   :ARCHIVE:  new
>> >   :END:
>> >
>> > But if org-adapt-indentation is nil, it will be like:
>> >
>> > * Heading
>> > :PROPERTIES:
>> > :ARCHIVE:  new
>> > :END:
>> >
>> > and I remember that behavior before the introduced change was that
>> > properties were intended, which does look nicer for properties.
>> >
>> > But I definitely do not prefer cursor to come indentend after writing a 
>> > header like:
>> >
>> > * Heading
>> >   C
>> >   ursor on C
>> >
>> >
>> 
>> Sounds like you want the 'headline-data value for this variable. Please
>> check the documentation.
>
> If I set `org-adapt-indent' to 'headline-data, I get that same
> behavior that after pressing ENTER on headline line, position becomes
> indentend. So it does not make it right.
>
> My favour was the behaviour how it was before introduction of
> indentation change:
>
> - after headline, cursors went to beginning of line; I find it
>   usable, as that is where I write text. 
>
> - if I ever wanted to enter properties with C-c C-x p, those were 
> automatically
>   indented,
>
> But OK I can personally get used, especially that I these months avoid
> using any properties in Org mode.
>
>
> "GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 
> 1.17.4, Xaw3d scroll bars)
>  of 2021-05-02"

This is  exactly what headline-data does. I suspect what your running
into is electric-indent-mode and you need to turn it off to get the
behaviour you want. So set org-adapt-indentation to hedline-data and
turn off electric-indent-mode and you will get the indentation style you
are after.

The issue here isn't that org-adapt-indentation changed. The issue is
that the effect of this setting changed when org mode was updated to be
consistent with the rest of emacs and honour electric-indent-mode, which
is enabled by default in emacs. Previously, org ignored this wider Emacs
default setting.

The poll is to decide if we should change this long standing default due
to the side effects from enabling electric-indent-mode. Enabling
electric-indent-mode was done to make org mode consistent with other
Emacs modes, so disabling it by default would be inconsistent with Emacs
defaults. 

I'm not sure the full impact of enabling electric-indent-mode was
realised at the time. With org, I think the general principal is to try
and have defaults set to the 'least surprising' value, particularly for
new users. 
-- 
Tim Cross



reply via email to

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