emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Turning off all indentation in 9.4.4


From: Tim Cross
Subject: Re: Turning off all indentation in 9.4.4
Date: Wed, 17 Feb 2021 18:56:37 +1100
User-agent: mu4e 1.5.8; emacs 27.1.91

Kyle Meyer <kyle@kyleam.com> writes:

> TRS-80 writes:
>
>> On 2021-02-04 12:45, Kévin Le Gouguec wrote:
> [...]
>>> ORG-NEWS provides these hints:
>>>
>>>> To get the previous behaviour back, disable ~electric-indent-mode~
>>>> explicitly:
>>>>
>>>> #+begin_src emacs-lisp
>>>> (add-hook 'org-mode-hook (lambda () (electric-indent-local-mode -1)))
>>>> #+end_src
>>>>
>>>> Alternatively, if you wish to keep =RET= as the "smart-return" key,
>>>> but dislike Org's default indentation of sections, you may prefer to
>>>> customize ~org-adapt-indentation~ to either =nil= or ='headline-data=.
> [...]
>> Unfortunately, unless I am doing something wrong, none of these options
>> seem to really restore the previous behavior.  I have set
>> ~org-adapt-indentation~ to ~'headline-data~, and now pressing RET goes
>> to column 0.  However, unfortunately, TAB now no longer jumps to the
>> indentation level of the previous block (for example, so I can insert a
>> code block or other block structure into a plain list at the correct
>> level).
>
> I think you're talking about the following behavior.
>
>   * a
>   <point>foo
>
> With org-adapt-indentation at nil (or the new headline-data value), foo
> doesn't get indented.  This behavior is not new to 9.4.  If you try with
> 9.3.8 and org-adapt-indentation is set to nil, it also will not indent.
> Step through org--get-expected-indentation to see how the different
> values of org-adapt-indentation are handled.
>
> So, if I'm reading your preferences correctly, it sounds like you want
> just the first suggestion in the above snippet, leaving
> org-adapt-indentation at its default value:
>
>   (add-hook 'org-mode-hook (lambda () (electric-indent-local-mode -1)))

I think it might be slightly more complicated.

For me, here is what I would like

1. Draws and planning data indented according to the headline level
(i.e. headline-data)

2. No indentation on 'normal' lines UNLESS I indent the first line of
the paragraph/block. Then, once I do indent that first line, after
hitting return, I can hit tab and it will indent to the same level as
the proceeding line.

I thought this was the behaviour I use to have before org was updated to
comply with electric-indent mode. I could be wrong.

Currently, if I have org-adaptive-indent set to 'heading-data, if I
manually indent a line, I cannot indent subsequent lines to the same
level. Tab does nothing and I have to hit spaces.

I need to go back through the possible combinations to make sure I
didn't miss something. However, it seems I can have drawers/planning
lines indented to the headline level with org-adaptive-indent set to
heading-data, but then cannot indent individual paragraphs/blocks inside
the heading with tab or I set org-adaptive-indent to nil and manually
indent the draw/planning lines and then can manage content indentation
as I use to.

None of this is critical as it is really just aesthetics (i.e. does not
affect exports), but it did seem to be more DWIM before than it is now.

--
Tim Cross



reply via email to

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