emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Python src blocks indent


From: Fabrice Popineau
Subject: Re: [O] Python src blocks indent
Date: Wed, 17 May 2017 22:49:07 +0200

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 <address@hidden>:
Fabrice Popineau <address@hidden> 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,


reply via email to

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