0

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).

enter image description here

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: enter image description here

1
  • What’s wrong with the background color? I see white text on a black background…
    – db48x
    Jun 11 at 23:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.