all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* python-mode unexpectedly switches to tabs for indenting
@ 2013-03-16 19:01 matt
  2013-03-17  8:38 ` Andreas Röhler
  0 siblings, 1 reply; 2+ messages in thread
From: matt @ 2013-03-16 19:01 UTC (permalink / raw)
  To: help-gnu-emacs

For reasons I don't understand, emacs has unexpectedly switched to using tabs instead of spaces for auto-indenting and commands like (newline-and-indent) [key sequence: C-j] for one of of the python files in the project I'm working on.  It was using the 4-space indent that the python mode has configured previously.  I checked and none of the python-mode configuration has changed.  It doesn't happen for any of the other files in the same directory-- just for this one file-- which makes me thing that I somehow unwittingly set some file-local variables.  The file has DOS style newlines.

I tried using the "M-x untabify" command and then query-replacing all the tabs in the file to see if that might toggle the behavior, but tab insertion on C-j still persists.

I'm really at a loss to explain what happened, and it really disturbs me that this can happen without me having any clue.  Any help/insight is appreciated!  Thanks in advance!


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

* Re: python-mode unexpectedly switches to tabs for indenting
  2013-03-16 19:01 python-mode unexpectedly switches to tabs for indenting matt
@ 2013-03-17  8:38 ` Andreas Röhler
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Röhler @ 2013-03-17  8:38 UTC (permalink / raw)
  To: help-gnu-emacs

Am 16.03.2013 20:01, schrieb matt:
> For reasons I don't understand, emacs has unexpectedly switched to using tabs instead of spaces for auto-indenting and commands like (newline-and-indent) [key sequence: C-j] for one of of the python files in the project I'm working on.  It was using the 4-space indent that the python mode has configured previously.  I checked and none of the python-mode configuration has changed.  It doesn't happen for any of the other files in the same directory-- just for this one file-- which makes me thing that I somehow unwittingly set some file-local variables.  The file has DOS style newlines.
>
> I tried using the "M-x untabify" command and then query-replacing all the tabs in the file to see if that might toggle the behavior, but tab insertion on C-j still persists.
>
> I'm really at a loss to explain what happened, and it really disturbs me that this can happen without me having any clue.  Any help/insight is appreciated!  Thanks in advance!
>

Seems indent-tabs-mode is on now. Should be off be default IMO.

M-x customize-variable RET indent-tabs-mode



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

end of thread, other threads:[~2013-03-17  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-16 19:01 python-mode unexpectedly switches to tabs for indenting matt
2013-03-17  8:38 ` Andreas Röhler

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.