0

I'm editting the following file in emacs using org mode

- paragraph 1 which is part of a list and extends to multiple lines
  #+BEGIN_SRC 
  . . . <some source code here> . . .
  #+END_SRC
  Continue the rest of paragraph 1

Now, my problem is that I don't know how to write the rest of paragraph 1 which comes right after the #+END_SRC on the same level of indentation, because although I hit Enter on the keyboard to insert a new line, it should remain at the same level of indentation of the paragraph 1 as it is still part of the same paragraph but Emacs just puts it at the beginning of the next line and doesn't conserve the current structure in terms of line indentation anymore (in regard to paragraph1 indentation level). Any idea? Thanks.

2 Answers 2

1

Finally I found the answer. If the source code block is indented as much as a child element of the top level (that is, the list), then all is needed is to start the rest of the paragraph after the source code block, by just left padding with enough space characters at the beginning to put it at the same level as the lines above the source code block.

Therefore, instead of writing

- paragraph 1 which is part of a list and extends to multiple lines
  #+BEGIN_SRC 
      . . . <some source code here> . . .
  #+END_SRC
  Continue the rest of paragraph 1

I had to write

- paragraph 1 which is part of a list and extends to multiple lines
      #+BEGIN_SRC 
          . . . <some source code here> . . .
      #+END_SRC
  Continue the rest of paragraph 1
0

Press TAB to indent to paragraph level.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.