When having a source block in a .org
document, with line wrapping enabled, the continuation of an indented, long line, that is wrapped to the next line is naturally also indented. The problem is, that the space before the line continuation does not use the org-block face, but rather the org-indent
face from org-indent-mode
. (See first block in screenshot below).
This behavior becomes even more undesirable when a long line is not separated by spaces. I am using word-wrapping (and as far as I was able to find out, there is no way for having word wrapping outside src-blocks and per character wrapping inside), and when a long line with no spaces gets wrapped, it produces an empty line above. (See second block in screenshot below).
Furthermore, some config I use that might be related:
(setq org-edit-src-content-indentation 0)
I also tried the following, to no avail:
(setq org-src-preserve-indentation t)
(use-package adaptive-wrap ...)
EDIT:
Without org-indent-mode
(which I want to keep using), the blocks look like this: