From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-babel-trangle, proble when loop is interrupted by documentation Date: Sat, 21 Apr 2018 11:17:10 +0200 Message-ID: <87sh7oex61.fsf@nicolasgoaziou.fr> References: <87sh7p0xjk.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9odx-0006SI-OM for emacs-orgmode@gnu.org; Sat, 21 Apr 2018 05:17:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9odu-0005DD-K5 for emacs-orgmode@gnu.org; Sat, 21 Apr 2018 05:17:17 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:34481) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f9odu-0005CR-CW for emacs-orgmode@gnu.org; Sat, 21 Apr 2018 05:17:14 -0400 Received: from saiph (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 21EF2E0002 for ; Sat, 21 Apr 2018 11:17:12 +0200 (CEST) Received: from ngz by saiph with local (Exim 4.89) (envelope-from ) id 1f9odq-00079v-NQ for emacs-orgmode@gnu.org; Sat, 21 Apr 2018 11:17:10 +0200 In-Reply-To: <87sh7p0xjk.fsf@mat.ucm.es> (Uwe Brauer's message of "Sat, 21 Apr 2018 10:32:47 +0200") 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" To: emacs-orgmode@gnu.org Hello, Uwe Brauer writes: > Please consider the following test org file > * A test example > ,---- > | #+BEGIN_SRC matlab :tangle test.m > | function [ll x]=mitest(A0,x0) > | % initialization > | format long > | epsi=1.e-3; > | nit=0; > | nmaxit=200; > | Delta=10; > | A=A0; > | while Delta>epsi & nit | nit=nit+1; % counter > | #+END_SRC > | Some explanation... > | #+BEGIN_SRC matlab :tangle test.m > | y=A*x0; > | end > | #+END_SRC > | The basic idea is. > `---- > > > I have interrupted the while loop by some text, when I now toggle, the > indentation is broken as you can see. > > ,---- > | function [ll x]=mitest(A0,x0) > | % initialization > | format long > | epsi=1.e-3; > | nit=0; > | nmaxit=200; > | Delta=10; > | A=A0; > | while Delta>epsi & nit | nit=nit+1; % counter > | > | y=A*x0; > | end > `---- > > There is an empty line and > y=A*x0 is not indented. > > How can this behavior be avoided? I guess you have to set `org-src-preserve-indentation' globally, or use "-i" flag for the block, which is locally equivalent. Regards, -- Nicolas Goaziou