From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: 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 Message-ID: <87fvnxutut.fsf@alphaville.bos.redhat.com> References: <525DE996.2000408@gmail.com> <52F2A1D2.4030802@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBA7G-0006e2-BX for emacs-orgmode@gnu.org; Wed, 05 Feb 2014 16:34:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBA74-0003xM-CE for emacs-orgmode@gnu.org; Wed, 05 Feb 2014 16:34:42 -0500 Received: from plane.gmane.org ([80.91.229.3]:36398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBA74-0003wc-5U for emacs-orgmode@gnu.org; Wed, 05 Feb 2014 16:34:30 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WBA73-0002mN-06 for emacs-orgmode@gnu.org; Wed, 05 Feb 2014 22:34:29 +0100 Received: from pool-98-110-175-184.bstnma.fios.verizon.net ([98.110.175.184]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Feb 2014 22:34:28 +0100 Received: from ndokos by pool-98-110-175-184.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Feb 2014 22:34:28 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Omid 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