[issue5124] IDLE - pasting text doesn't delete selection

2016-06-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, I looked on 3.5 change and missed that in 3.6 you test both tkinter.Entry and ttk.Entry. -- ___ Python tracker

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy: entry=entry as much as any name=expression pair to print the value of variable entry on test failure, either "entry=)" or "entry=)", as in == FAIL: test_paste_entry

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: The two stable buildbots that failed on test_idle before do not now: AMD64 SnowLeapard 1403, AMD64 Win 7 2258. -- stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Oh right, requires('gui') does not work at module level in 2.7. This should fix. Will try to check next round of bot builds. -- ___ Python tracker

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 274308a3b8b6 by Terry Jan Reedy in branch '2.7': Issue #5124: For 2.7, move requires('gui') from module level to setUpClass. https://hg.python.org/cpython/rev/274308a3b8b6 -- ___ Python tracker

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-11 Thread Ned Deily
Ned Deily added the comment: Terry, the 2.7 version of the test changes is causing buildbot and test_idle failures when the "gui" condition is not met. See, for example, http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%202.7/builds/1400. -- stage: resolved -> needs patch

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: entry=entry in test is not needed. -- ___ Python tracker ___ ___

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3017e41b0c99 by Terry Jan Reedy in branch '2.7': Issue #5124: NEWS entries. https://hg.python.org/cpython/rev/3017e41b0c99 New changeset 62b949a179cb by Terry Jan Reedy in branch '3.5': Issue #5124: NEWS entries.

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-11 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 095e79636663 by Terry Jan Reedy in branch 'default': Issue #5124: rename PyShell back to pyshell and patch test for 3.6 https://hg.python.org/cpython/rev/095e79636663 -- ___ Python tracker

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 99760b6a181e by Terry Jan Reedy in branch 'default': Issue #5124: Temporary pyshell rename to avoid case-folding collision in merge. https://hg.python.org/cpython/rev/99760b6a181e New changeset 6c469b50e198 by Terry Jan Reedy in branch '2.7': Issue

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I had some trouble committing and pushing these patches. After deleting TEntry and committed the 2.7 and 3.5 patches and tried to do the usual 3.5 to default forward merge in TortoiseHG. I got % hg merge --tool :merge --verbose 101861 resolving manifests

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be better to exclude TEntry from the list. This is a hack, and as every hack it can be not fully compatible with future Tk versions. -- ___ Python tracker

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: I presume then that the tests pass on Linux with TEntry removed. I take this as repudiation of the 'X11' behavior by the tk maintainers, and as support for changing the old widgets. Having different paste behavior in text and entry widgets, or even

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I deliberately omitted ttk.Entry, because it doesn't have special behavior on X11. -- ___ Python tracker ___

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: For 3.6, I added ttk.Entry to x11 fixer. I expanded tests to Entry and Spinboxes. I noted in a comment that tk.Entry/Spinbox, but not ttk.Entry, would not paste with generated <> event without a 0-length selection. This might be a glitch in tk, but pasting

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : Added file: http://bugs.python.org/file43324/x11-paste-35.diff ___ Python tracker ___

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : Added file: http://bugs.python.org/file43325/x11-paste-27.diff ___ Python tracker ___

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Tested. LGTM. -- stage: patch review -> commit review ___ Python tracker ___

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: To avoid bloating pyshell.main further, and to facilitate testing, I put the new code in a separate function called from main and a test. The test should PASS as is and FAIL on X11 with the call to fix_x11_paste commented out. If it does not, it is not a

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-07 Thread Ned Deily
Ned Deily added the comment: Terry, after the discussion I don't have a strong opinion one way or the other. It seems that current X11 users expect the replace behavior, so option 4 seems fine to me. -- ___ Python tracker

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I presume you mean option 4. I understand this to be what David and others expected. Ned, what do you think now? You were opposed 3 years ago, but we have a bit more evidence that the current behavior is out of whack with current Linux practice. Should I

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is better to fix this in all versions unconditionally. This simple workaround is good enough for IDLE, but if add it as a part of Tkinter, it should be much more complex. I prefer to provide this as a recipe at

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I can't test but I looked at the patch. It uses the new-to-me fact that bound 'functions' can be tcl code in a string. For me, root.bind_class('Text', '<>') returns the code string '\ntk_textPaste %W\n'. Options for the patch: 0. Do nothing. 1. 3.6 as

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that makes pasting text in all Text, Entry and Spinbox widgets to delete selection. -- stage: test needed -> patch review Added file: http://bugs.python.org/file43195/idle_paste_replace.patch ___

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-03 Thread R. David Murray
R. David Murray added the comment: Note that I would find it *very* confusing if the paste took place at some other location than the cursor location. From Serhiy's description I don't think that's an issue in the proposed change. -- ___ Python

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In modern text editors selecting text with a mouse moves text cursor, and moving the cursor by arrow keys cancels the selection (if Shift is not pressed). But in terminal emulators selecting text with a mouse doesn't move text cursor, and moving the cursor

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you David, that does help. Your comment emphasizes that on other systems and many other X-11 apps, the user already chooses 'replace' versus 'insert' by selecting a replacement or not. I presume the 'selection buffer' you refer to is different from

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-03 Thread R. David Murray
R. David Murray added the comment: For what it is worth, as a dedicated X11 user, *if* the target is already hilighted by the application I expect the replace behavior. But in my usage I never select the target myself, since that would replace my selection buffer. So in essence I'm seeing

[issue5124] IDLE - pasting text doesn't delete selection

2016-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: I just got a complaint from a Linux user who says IDLE is the only application she uses on Linux that has this augment rather than replace behavior. She also uses IDLE on Windows, so this unique IDLE-Linux behavior is quite annoying. Replace at least needs

[issue5124] IDLE - pasting text doesn't delete selection

2014-02-03 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: -BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5124 ___ ___

[issue5124] IDLE - pasting text doesn't delete selection

2013-07-08 Thread Mark Young
Mark Young added the comment: +1 at least providing the option. This behavior is obnoxious and weird (no other program on linux that I know of does this (not to say no such program exists)). If I didn't want the original gone, I wouldn't have highlighted it. -- nosy: +Mark.Young

[issue5124] IDLE - pasting text doesn't delete selection

2013-05-26 Thread Ned Deily
Ned Deily added the comment: X11-based Tk follows general X11 practice with regard to text pasting. See http://wiki.tcl.tk/3771 for some background. Old school X11 users expect pasting to work that way. This is yet another instance where Tk attempts to conform to the platform it is running

[issue5124] IDLE - pasting text doesn't delete selection

2013-05-26 Thread Roger Serwy
Roger Serwy added the comment: There are many X11 applications that replace the selection with pasted text. GTK and Qt widgets behave that way. Here's a brief list: gedit (GTK), gummi (GTK), kate (Qt), texmaker (Qt). Tkinter, for me, has become increasingly frustrating due to these subtle

[issue5124] IDLE - pasting text doesn't delete selection

2013-05-26 Thread Guilherme Simões
Guilherme Simões added the comment: I think IDLE should ignore general X11 practice. I used Linux for years and have never seen this behavior before because almost all programs behave in the Mac/Windows way. -- nosy: +Guilherme.Simões ___ Python

[issue5124] IDLE - pasting text doesn't delete selection

2013-05-26 Thread Ned Deily
Ned Deily added the comment: Unfortunately, there is no one right answer to paste behavior on X11, unlike on native Windows and Mac implementations where there is essentially system-wide consistent paste behavior enforced by the underlying operating system. As the Tk Wiki points out (and the

[issue5124] IDLE - pasting text doesn't delete selection

2013-05-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that the paste replace should be added as an option on linux, but without a broader survey of Linux Idle users to convince me otherwise, I have to agree that the default should stay as it is. I do not see any call to make the x11 behavior an option on

[issue5124] IDLE - pasting text doesn't delete selection

2013-05-26 Thread Todd Rovito
Todd Rovito added the comment: I haver verified Roger's patch does indeed fix the problem on Linux CentOS 6.4 with IDLE 3.4. The Linux situation is complex. Basically as I see it over the years pure X11 applications are becoming extinct and most developers either use GTK (for GNOME) or QT

[issue5124] IDLE - pasting text doesn't delete selection

2013-05-25 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: +BreamoreBoy, roger.serwy, terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5124 ___

[issue5124] IDLE - pasting text doesn't delete selection

2013-05-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: On Win7, I get the replacement behavior. I get the same in Notepad and Firefox, so this may be standard Windows behavior. What is standard in other linex and mac apps? If the tk difference is a standard platform difference, I might think we should leave it

[issue5124] IDLE - pasting text doesn't delete selection

2013-05-25 Thread Todd Rovito
Todd Rovito added the comment: What is standard in other linex and mac apps? -On Mac OS X 10.8.3 TextEdit I get the replacement behavior -On Linux CentOS 6.4 gedit I get the replacement behavior -On IDLE under the latest 3.4 pull I get the replacement behavior with Max OS X 10.8.3 -On IDLE

[issue5124] IDLE - pasting text doesn't delete selection

2009-08-01 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: btw, I just added a patch for issue3559 which could be easily adjusted to work as described in this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5124

[issue5124] IDLE - pasting text doesn't delete selection

2009-02-01 Thread Weeble
New submission from Weeble clockworksa...@gmail.com: Steps to reproduce: 1. Start IDLE. 2. Enter some text: spam eggs 3. Select the first line (spam) and press control+c to copy. 4. Select the second line (eggs) and press control+v to paste. Expected result: spam spam (With the caret at the

[issue5124] IDLE - pasting text doesn't delete selection

2009-02-01 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: This is not really related to IDLE, it is how the Text widget behaves under Linux, you will notice the same with tcl/tk 8.5. Nevertheless, I would prefer to have the same results under Windows and Linux. -- nosy: +gpolo