emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Fabrice Popineau <fabrice.popineau@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Python src blocks indent
Date: Wed, 17 May 2017 22:49:07 +0200	[thread overview]
Message-ID: <CAFgFV9NRSp=Bo0ppHUZTJ8js+ukx_7Y6Suoo2jnPwpop_FpgKA@mail.gmail.com> (raw)
In-Reply-To: <87a86br5qk.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 1049 bytes --]

Thanks Nicolas.

I should have looked closer at ox-ipynb since the problem is in there.
It should make use of  `org-export-unravel-code' and it doesn't. Instead
it trims leading white spaces from the src code.
I'll report it to the scimax github repository.

Best regards,

2017-05-17 15:08 GMT+02:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:

> Fabrice Popineau <fabrice.popineau@gmail.com> writes:
>
> > I mean that in the Org buffer I have for example :
> >
> > #+BEGIN_SRC ipython :session
> >   def fact(n):
> >       if n == 1:
> >           return 1
> >       else:
> >           return n * fact(n-1)
> > #+END_SRC
> >
> > That is, there is a 2 spaces indentation of the whole code block, and the
> > code block is properly indented.
> > When I export it, I get :
> >
> > def fact(n):
> >       if n == 1:
> >           return 1
> >       else:
> >           return n * fact(n-1)
>
> FWIW I cannot reproduce it. You may want to debug
> `org-export-unravel-code', `org-export-format-code' or
> `org-export-format-code-default'.
>
> Regards,
>

[-- Attachment #2: Type: text/html, Size: 1863 bytes --]

      reply	other threads:[~2017-05-17 20:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-16 19:11 Python src blocks indent Fabrice Popineau
2017-05-17 12:27 ` Nicolas Goaziou
2017-05-17 12:45   ` Fabrice Popineau
2017-05-17 13:08     ` Nicolas Goaziou
2017-05-17 20:49       ` Fabrice Popineau [this message]

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFgFV9NRSp=Bo0ppHUZTJ8js+ukx_7Y6Suoo2jnPwpop_FpgKA@mail.gmail.com' \
    --to=fabrice.popineau@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).