emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Henri-Paul Indiogine <hindiogine@gmail.com>
Cc: emacs-org <emacs-orgmode@gnu.org>
Subject: Re: C-c '
Date: Fri, 26 Aug 2011 18:23:07 -0400	[thread overview]
Message-ID: <87sjonak38.fsf@norang.ca> (raw)
In-Reply-To: <CAG_r7O4BZPup4xuij3zXCMSMedFRW=RgAdThmTfu_NWXAg79PA@mail.gmail.com> (Henri-Paul Indiogine's message of "Fri, 26 Aug 2011 14:48:11 -0700")

Henri-Paul Indiogine <hindiogine@gmail.com> writes:

> Greetings!
>
> I noticed something strange when I edit a block of source code using C-c '.
>
> Each time I close the editor, using C-c '  the code block shift 2
> places to the right.  That is, 2 black spaces are added at the
> beginning of each line.  Each time I edit a code block this happens
> again.  So, each time I edit a code block the code shifts to the right
> more and more.
>
> I waste a lot of time getting rid of these empty spaces.  Yes, I can
> use a emacs macro, but still ..
>
> Am I missing something?

Hi Henri-Paul,

It's not supposed to do that.  It is supposed to indent by 2 spaces and
then remove those 2 spaces in C-c ' again.

There's a variable (that I just found out about yesterday -- Thanks
Nick!) which will turn this indentation off completely.

Try setting 

(setq org-src-preserve-indentation t)

and see if that helps.

Please provide details of your org mode version (M-x org-version RET)
and emacs version (M-x emacs-version RET)

Regards,
Bernt

  reply	other threads:[~2011-08-26 22:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26 21:48 C-c ' Henri-Paul Indiogine
2011-08-26 22:23 ` Bernt Hansen [this message]
2011-08-26 23:03   ` Henri-Paul Indiogine
2011-08-26 23:18     ` Nick Dokos

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=87sjonak38.fsf@norang.ca \
    --to=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=hindiogine@gmail.com \
    /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).