[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug: Behavior of org-adapt-indentation [9.4.6 (9.4.6-10-gee652a-elpa @ /
Bug: Behavior of org-adapt-indentation [9.4.6 (9.4.6-10-gee652a-elpa @ /home/fsantos/.emacs.d/elpa/org-20210705/)]
Wed, 07 Jul 2021 08:35:04 +0200
This might not be *really* a bug, but since a recent update of Org, I
noticed an unwanted indentation of code blocks when the variable
org-adapt-indentation is set to 'headline-data. It can be reproduced
with this very minimal org config:
(setq org-adapt-indentation 'headline-data))
In an org buffer, create a headline, and then:
1. Type some text which does *not* follow an empty line an press TAB:
nothing happens (which is the expected behavior).
2. Type some text which does follow an empty line an hit TAB: this text
gets indented according to the current headline level (the help page
looks unclear to me: it might also be the expected behavior,
although I don't really understand the rationale for it).
Point 2. has a side effect: when you still use the old template
expansion mechanism for code blocks (the one provided by org-tempo.el,
e.g. type <s and then hit TAB to expand a template), those code blocks
now get indented according to the headline level (because you press TAB,
I guess). I think it's not the expected behavior, since those code
blocks that follow an empty line will have a different indentation than
the text before and after them.
Here is an animated gif to better illustrate what I mean:
Is there a workaround to avoid this indentation of code blocks?
All the best,
Emacs : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27,
cairo version 1.17.4)
Package: Org mode version 9.4.6 (9.4.6-10-gee652a-elpa @
|[Prev in Thread]
||[Next in Thread]|
- Bug: Behavior of org-adapt-indentation [9.4.6 (9.4.6-10-gee652a-elpa @ /home/fsantos/.emacs.d/elpa/org-20210705/)],
Frédéric Santos <=