converts tabs to spaces in indent-tabs-mode t

Bug #1019128 reported by Yaroslav Halchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
High
Andreas Roehler

Bug Description

I have a codebase (fail2ban) which used tabs for indentation

now when e.g. standing on the front of middle line in

   self.fd, self.name = tempfile.mkstemp('fail2ban', 'monitorfailures')
   self.filter = Filter_(None)
   self.filter.addLogPath(self.name)

I press Enter -- I would get a new empty line and that line would loose its tabs -- they would get replaced with spaces... yikes!

I have

indent-tabs-mode is a variable defined in `C source code'.
Its value is t
Local in buffer filtertestcase.py; global value is t

Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.1.0
importance: Undecided → High
Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 1019128] [NEW] converts tabs to spaces in indent-tabs-mode t

Am 29.06.2012 06:22, schrieb Yaroslav Halchenko:
> Public bug reported:
>
> I have a codebase (fail2ban) which used tabs for indentation
>
> now when e.g. standing on the front of middle line in
>
> self.fd, self.name = tempfile.mkstemp('fail2ban', 'monitorfailures')
> self.filter = Filter_(None)
> self.filter.addLogPath(self.name)
>
> I press Enter -- I would get a new empty line and that line would loose
> its tabs -- they would get replaced with spaces... yikes!
>
> I have
>
> indent-tabs-mode is a variable defined in `C source code'.
> Its value is t
> Local in buffer filtertestcase.py; global value is t
>
> ** Affects: python-mode
> Importance: Undecided
> Status: New
>

py-indent-tabs-mode

toggles it.

See also in meny PyTools.

BTW py-indent-tabs-mode-on/off are broken, will be fixed, but don't interfere.

Thanks for the report,

Andreas

Changed in python-mode:
status: New → In Progress
Revision history for this message
Andreas Roehler (a-roehler) wrote :

Am 29.06.2012 06:22, schrieb Yaroslav Halchenko:

okay, seeing a serious bug in py-indent-and-newline

Revision history for this message
Andreas Roehler (a-roehler) wrote :

please re-open if not done

Changed in python-mode:
status: In Progress → Fix Committed
Revision history for this message
Yaroslav Halchenko (yarikoptic) wrote :

confirming that this one seems to be gone
thanks!

Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.