[issue16887] IDLE - tabify/untabify applied when clicking Cancel

2013-04-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d7aa625147f7 by Roger Serwy in branch '2.7':
#16887: IDLE now accepts Cancel in tabify/untabify dialog box.
http://hg.python.org/cpython/rev/d7aa625147f7

New changeset 5451b82104f3 by Roger Serwy in branch '3.3':
#16887: IDLE now accepts Cancel in tabify/untabify dialog box.
http://hg.python.org/cpython/rev/5451b82104f3

New changeset 54f6d8c4dfaf by Roger Serwy in branch 'default':
#16887: merge with 3.3.
http://hg.python.org/cpython/rev/54f6d8c4dfaf

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16887
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16887] IDLE - tabify/untabify applied when clicking Cancel

2013-04-06 Thread Roger Serwy

Roger Serwy added the comment:

Closing the issue as fixed.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16887
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16887] IDLE - tabify/untabify applied when clicking Cancel

2013-04-01 Thread Todd Rovito

Todd Rovito added the comment:

Roger,
  I tested the patch and it does seem to function as you describe so feel free 
to apply the patch.  The tabify function makes me scratch my head a little, 
according to help.txt:
Tabify Region   -- Turns *leading* stretches of spaces into tabs
(Note: We recommend using 4 space blocks to indent Python code.)

Yet this code doesn't seem to get tabifyed.
a=[1,2,3,4,5]
for i in range(0, len(a)):
 print(%d % a[i])

I would expect that the print statement be tabbed in but on my Mac it does not 
seem to do that it just puts back in the single space in front of the print.  
This might be a separate issue but I was wondering if perhaps I misunderstand 
the purpose of this function?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16887
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16887] IDLE - tabify/untabify applied when clicking Cancel

2013-04-01 Thread Roger Serwy

Roger Serwy added the comment:

Todd,

Tabify/Untabify are functions to deal with the great tabs vs. spaces debate 
(though PEP8 says that spaces are the way to go). 

The tabify function needs a minimum of 2 spaces before it replaces it with a 
tab.

Its implementation in Lib/idlelib/EditorWindow.py under the tabify_region_event 
and untabify_region_event reveals a curiousity in its implementation. Tabify 
will replace spans of space characters with tabs, but still leave in extra 
space characters if needed. Untabify simply expands all tabs to a fixed number 
of spaces.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16887
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16887] IDLE - tabify/untabify applied when clicking Cancel

2013-03-31 Thread Roger Serwy

Roger Serwy added the comment:

If there are no objections, I will apply this patch after 2013-04-05.

--
assignee:  - roger.serwy
versions:  -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16887
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16887] IDLE - tabify/untabify applied when clicking Cancel

2013-03-31 Thread Todd Rovito

Changes by Todd Rovito rovit...@gmail.com:


--
nosy: +Todd.Rovito

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16887
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16887] IDLE - tabify/untabify applied when clicking Cancel

2013-01-14 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16887
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16887] IDLE - tabify/untabify applied when clicking Cancel

2013-01-11 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16887
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16887] IDLE - tabify/untabify applied when clicking Cancel

2013-01-07 Thread Roger Serwy

New submission from Roger Serwy:

Krystian RosiƄski notified me about an error with Tabify/Untabify. Clicking 
cancel still performs the operation because the _asktabwidth function in 
Lib/idlelib/EditorWindow.py always returns a number, regardless of cancel being 
clicked.

This bug is visibly noticeable with IdleX since it highlights all \t Tabs, but 
not with the original IDLE.

The attached patch solves the problem.

--
components: IDLE
files: tabify.patch
keywords: patch
messages: 179282
nosy: serhiy.storchaka, serwy
priority: low
severity: normal
stage: patch review
status: open
title: IDLE - tabify/untabify applied when clicking Cancel
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28620/tabify.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16887
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com