From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: emacs-orgmode@gnu.org
Subject: Re: org-babel-trangle, proble when loop is interrupted by documentation
Date: Sat, 21 Apr 2018 11:17:10 +0200 [thread overview]
Message-ID: <87sh7oex61.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87sh7p0xjk.fsf@mat.ucm.es> (Uwe Brauer's message of "Sat, 21 Apr 2018 10:32:47 +0200")
Hello,
Uwe Brauer <oub@mat.ucm.es> 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<nmaxit
> | 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<nmaxit
> | 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
next prev parent reply other threads:[~2018-04-21 9:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-21 8:32 org-babel-trangle, proble when loop is interrupted by documentation Uwe Brauer
2018-04-21 9:17 ` Nicolas Goaziou [this message]
2018-04-21 12:15 ` Uwe Brauer
2018-04-21 12:20 ` [SOLVED :padline no] (was: org-babel-trangle, proble when loop is interrupted by documentation) Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sh7oex61.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.