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 14:45:53 +0200 [thread overview]
Message-ID: <CAFgFV9N=VpcTUyxtoA9Shv67BoxgoWzdUiONxX7x1Kv3DZGkgA@mail.gmail.com> (raw)
In-Reply-To: <87mvabr7lj.fsf@nicolasgoaziou.fr>
[-- Attachment #1: Type: text/plain, Size: 981 bytes --]
Hi,
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)
in the IPython cell (basically, the notebook format is JSON and it is easy
to count those spaces in the code string in the JSON file)
and the 2 org-edit-src-content-indentation have been removed
only on the first line. The other ones have 6 or 10 spaces instead of 4 and
8.
Given that changing org-edit-src-content-indentation to 0 fixes this
problem, I wonder if there
is something wrong in the logic where this variable is used (only one place
in org-src).
But that could well be that it is not taken into account in places where it
should.
Regards,
Fabrice
[-- Attachment #2: Type: text/html, Size: 2678 bytes --]
next prev parent reply other threads:[~2017-05-17 12:46 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 [this message]
2017-05-17 13:08 ` Nicolas Goaziou
2017-05-17 20:49 ` Fabrice Popineau
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='CAFgFV9N=VpcTUyxtoA9Shv67BoxgoWzdUiONxX7x1Kv3DZGkgA@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).