Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE: editor versus grep line number differ #71411

Closed
terryjreedy opened this issue Jun 5, 2016 · 3 comments
Closed

IDLE: editor versus grep line number differ #71411

terryjreedy opened this issue Jun 5, 2016 · 3 comments
Assignees
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@terryjreedy
Copy link
Member

BPO 27224
Nosy @terryjreedy, @ned-deily

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/terryjreedy'
closed_at = <Date 2016-06-05.20:40:10.818>
created_at = <Date 2016-06-05.02:32:31.997>
labels = ['expert-IDLE', 'type-bug', 'invalid']
title = 'IDLE: editor versus grep line number differ'
updated_at = <Date 2019-03-23.04:15:12.621>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2019-03-23.04:15:12.621>
actor = 'terry.reedy'
assignee = 'terry.reedy'
closed = True
closed_date = <Date 2016-06-05.20:40:10.818>
closer = 'terry.reedy'
components = ['IDLE']
creation = <Date 2016-06-05.02:32:31.997>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 27224
keywords = []
message_count = 3.0
messages = ['267365', '267442', '267473']
nosy_count = 2.0
nosy_names = ['terry.reedy', 'ned.deily']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue27224'
versions = ['Python 3.6']

@terryjreedy
Copy link
Member Author

In IDLE 3.6, open idlelib.macosx (^M easiest). Open Find in Files dialog (Alt-F3), enter 'isAquaTk' (without quotes), and go. Output for me currently looks like
...\idlelib\macosx.py: 9: warnings.warn("runningAsOSXApp() is deprecated, use isAquaTk()",
...\idlelib\macosx.py: 11: return isAquaTk()
...\idlelib\macosx.py: 23: isAquaTk(), isCarbonTk(), isCocoaTk()...
...\idlelib\macosx.py: 39: def isAquaTk():
...\idlelib\macosx.py: 226: isAquaTk(), isCarbonTk(), isCocoaTk()...
...\idlelib\macosx.py: 230: if isAquaTk():

The first 4 line numbers are correct. The last two should be 232 and 236 to match the editor. Or the editor numbers should be 226 and 230 to match grep. I have not yet tried to cound to see which is correct, or look to see if there are long or continued lines that might throw one count off. I should copy the file and delete lines between 39 and 226.

@terryjreedy terryjreedy added the type-bug An unexpected behavior, bug, or error label Jun 5, 2016
@ned-deily
Copy link
Member

FWIW, using an IDLE built from the current top-of-trunk default (on OS X), the steps outlined above produce the correct result, 226 and 236, which match up with what other tools report.

@terryjreedy
Copy link
Member Author

Yesterday, I grepped three times and got the same wrong result each time, so I know I was not crazy. But today, starting fresh with no IDLE or TortoiseHg running, all is well. Closing as 'heisenbug' ;-). Lesson: start fresh before reporting weird behavior. (I should have known. I occasionally have to reboot windows to reset its key mappings.) Thanks, and sorry for the noise.

@terryjreedy terryjreedy self-assigned this Mar 23, 2019
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants