emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Behavior of Org mode Babel code snippets with respect to M-q (fi


From: Nick Dokos
Subject: Re: [O] Behavior of Org mode Babel code snippets with respect to M-q (fill-paragraph) and C-/ (undo)
Date: Wed, 05 Feb 2014 16:34:18 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Omid <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]