all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* C-c '
@ 2011-08-26 21:48 Henri-Paul Indiogine
  2011-08-26 22:23 ` Bernt Hansen
  0 siblings, 1 reply; 4+ messages in thread
From: Henri-Paul Indiogine @ 2011-08-26 21:48 UTC (permalink / raw)
  To: emacs-org

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?

Thanks,
Henri-Paul

-- 
Henri-Paul Indiogine

Curriculum & Instruction
Texas A&M University
TutorFind Learning Centre

Email: hindiogine@gmail.com
Skype: hindiogine
Website: http://people.cehd.tamu.edu/~sindiogine

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: C-c '
  2011-08-26 21:48 C-c ' Henri-Paul Indiogine
@ 2011-08-26 22:23 ` Bernt Hansen
  2011-08-26 23:03   ` Henri-Paul Indiogine
  0 siblings, 1 reply; 4+ messages in thread
From: Bernt Hansen @ 2011-08-26 22:23 UTC (permalink / raw)
  To: Henri-Paul Indiogine; +Cc: emacs-org

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: C-c '
  2011-08-26 22:23 ` Bernt Hansen
@ 2011-08-26 23:03   ` Henri-Paul Indiogine
  2011-08-26 23:18     ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: Henri-Paul Indiogine @ 2011-08-26 23:03 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-org

Hi Bernt!

2011/8/26 Bernt Hansen <bernt@norang.ca>:
> 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)

Yes, that removed the problem.   I am running the daily git version on
GNU Emacs 24.0.50.1.

Thanks,
Henri-Paul


-- 
Henri-Paul Indiogine

Curriculum & Instruction
Texas A&M University
TutorFind Learning Centre

Email: hindiogine@gmail.com
Skype: hindiogine
Website: http://people.cehd.tamu.edu/~sindiogine

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: C-c '
  2011-08-26 23:03   ` Henri-Paul Indiogine
@ 2011-08-26 23:18     ` Nick Dokos
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Dokos @ 2011-08-26 23:18 UTC (permalink / raw)
  To: Henri-Paul Indiogine; +Cc: Bernt Hansen, nicholas.dokos, emacs-org

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

> Hi Bernt!
> 
> 2011/8/26 Bernt Hansen <bernt@norang.ca>:
> > 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)
> 
> Yes, that removed the problem.   I am running the daily git version on
> GNU Emacs 24.0.50.1.
> 
> Thanks,
> Henri-Paul
> 

FWIW: The first C-c ' C-c ' cycle adds two spaces of indent, but it
stays at two after subsequent cycles.

I have org-src-preserve-indentation set to nil.

Org-mode version 7.7 (release_7.7.205.gce02a)

Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-26 23:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-26 21:48 C-c ' Henri-Paul Indiogine
2011-08-26 22:23 ` Bernt Hansen
2011-08-26 23:03   ` Henri-Paul Indiogine
2011-08-26 23:18     ` Nick Dokos

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.