emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: left padding added each time a code block is edited
Date: Fri, 08 Aug 2014 15:47:28 +0200	[thread overview]
Message-ID: <878umzytxr.fsf@gmx.us> (raw)
In-Reply-To: CANZRKX2dox3kafgttwfgpyBEh1KaL-XYFcf8kQkHLy0pKRrhmQ@mail.gmail.com

Hi Noah,

Noah Hoffman <noah.hoffman@gmail.com> writes:

> Noah Hoffman <noah.hoffman@gmail.com> writes:
>
>> Each time I edit a code block using =C-c '= (org-edit-special) and
>> then return to the org-mode buffer, two spaces are added to the left
>> margin of the code. For example,
>>
>> #+BEGIN_SRC python
>> print "hello"
>> #+END_SRC
>>
>> becomes
>>
>> #+BEGIN_SRC python
>>   print "hello"
>> #+END_SRC
>>
>> after one round-trip. This is particularly problematic for python code
>> blocks since leading whitespace is meaningful.

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!


> 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

Cheers,
Rasmus

-- 
A page of history is worth a volume of logic

  reply	other threads:[~2014-08-08 13:47 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 [this message]
2014-08-08 15:51       ` Noah Hoffman
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

  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=878umzytxr.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --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 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).