From: Noah Hoffman <noah.hoffman@gmail.com>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: left padding added each time a code block is edited
Date: Fri, 8 Aug 2014 08:51:45 -0700 [thread overview]
Message-ID: <CANZRKX2mWcQq1tbxgV0taMJBJbCvvfdqKP+p0s0m96_B8ss=Hg@mail.gmail.com> (raw)
In-Reply-To: <878umzytxr.fsf@gmx.us>
On Fri, Aug 8, 2014 at 6:47 AM, Rasmus <rasmus@gmx.us> wrote:
> Have you experienced any bugs with respect to this? On my system Babel
> will even run this code correctly:
>
> #+BEGIN_SRC python
> if True:
> return( "hello!")
> #+END_SRC
>
> #+RESULTS:
> : hello!
>
>
To use a slightly different example:
#+BEGIN_SRC python
import sys
for i in range(10):
print "foo"
#+END_SRC
-*- mode: compilation; default-directory: "~/Downloads/" -*-
Compilation started at Fri Aug 8 08:44:39
~/.emacs.d/bin/pychecker /Users/nhoffman/Downloads/broken.py
/Users/nhoffman/Downloads/broken.py:1:2: unexpected indent
import sys
^
/Users/nhoffman/Downloads/broken.py:1:3: E111 indentation is not a
multiple of four
/Users/nhoffman/Downloads/broken.py:1:3: E113 unexpected indentation
/Users/nhoffman/Downloads/broken.py:2:3: E111 indentation is not a
multiple of four
/Users/nhoffman/Downloads/broken.py:3:7: E111 indentation is not a
multiple of four
Compilation finished at Fri Aug 8 08:44:40
Anything other than 4 spaces per indention level is flagged by python
style/syntax checkers that enforce pep8 (and yes, many flame wars have
been fought on the topic, but there are good reasons for enforcing
consistency). This is an issue when editing code blocks and in tangled
code. Maybe it's primarily an aesthetic thing, but I think that it's
best when possible to set the default to follow the standard
conventions for the language (my python mode certainly seems to think
so!).
>> 2. While this variable is very well documented, it isn't very
>> discoverable via apropos or the html manual (at least, I wasn't able
>> to discover it). Perhaps a reference can be added to this variable in
>> the docstring for org-edit-src-code?
>
> Patches are more than welcome! There's a guide on Worg:
>
> http://orgmode.org/worg/org-contribute.html
I'll do so with pleasure! Thanks again.
next prev parent reply other threads:[~2014-08-08 15:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-07 22:18 left padding added each time a code block is edited Noah Hoffman
2014-08-07 22:41 ` Thorsten Jolitz
2014-08-07 23:08 ` Fwd: " Noah Hoffman
2014-08-08 13:47 ` Rasmus
2014-08-08 15:51 ` Noah Hoffman [this message]
2014-08-08 15:34 ` Achim Gratz
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='CANZRKX2mWcQq1tbxgV0taMJBJbCvvfdqKP+p0s0m96_B8ss=Hg@mail.gmail.com' \
--to=noah.hoffman@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=rasmus@gmx.us \
/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.