2

The fill-paragraph function isn't aware of the inline Org Mode source block syntax and is able to destroy it. For instance the following paragraph

Lorem ipsum dolor sit amet, consectetur src_emacs-lisp[:var x='adipiscing]{x} elit.
Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi.  

(after invoking the fill-paragraph) is rearranged into

Lorem ipsum dolor sit amet, consectetur src_emacs-lisp[:var
x='adipiscing]{x} elit. Proin nibh augue, suscipit a, scelerisque
sed, lacinia in, mi.

and the source block functionality is broken.

How can I prevent fill-paragraph from breaking Org Mode inline source block?

UPDATE:

I had this issue in Org Mode version 8.3.4. The problem does not apply to the Org Mode version 9.0.3 (at the time of writing this, 9.0.3 is the latest version available on Melpa).

Beware of this issue when updating to 9.X version!

  • 1
    I'm using Org mode version 9.1.5 but I still have this issue with fill-paragraph destroying code block formatting. Any idea how I could debug/fix this? – kbdluv Jan 7 '18 at 11:09

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.