Omid <omidl...@gmail.com> writes: > Hello, > > I am using Org-mode version 8.2.5g (8.2.5g-elpa) in GNU Emacs 24.3.1. > I have two questions about the behavior of the fantastic Org > mode+Babel with respect to code and comments: > > Here is a minimal example: > > #+BEGIN_SRC f90 :results verbatim :exports both > program main > ! This is a very very very very very very very very very very very very > very very very very long comment line. > print *, "Hello, World!" > end program main > #+END_SRC > > Below is the code snippet after M-q (fill-paragraph) on the comment > line. The comment line has been refilled (intended behavior) but all > lines have been indented. This may also be an intended behavior; but > > FIRST QUESTION: Is there a way to disable this indentation upon M-Q in > Org Babel code snippets? >
Try setting org-edit-src-content-indentation to 0. I'm not sure that it is going to work, but (based on rather flimsy numerological evidence, namely that its default value is 2 as is the indent below) it might. > #+BEGIN_SRC f90 :results verbatim :exports both > program main > ! This is a very very very very very very very very very very very very > ! very very very very long comment line. > print *, "Hello, World!" > end program main > #+END_SRC > BTW, I don't get this behavior but I don't use f90 mode, so I'm not sure whether there is some setup I'm missing. I get (with org-edit-src-content-indentation set to 0): #+BEGIN_SRC f90 :results verbatim :exports both program main ! This is a very very very very very very very very very very very very very very very very long comment line. print *, "Hello, World!" end program main #+END_SRC Nick