Title: IDLE: editor versus grep line number differ
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.6
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: ned.deily, terry.reedy
Priority: normal Keywords:

Created on 2016-06-05 02:32 by terry.reedy, last changed 2019-03-23 04:15 by terry.reedy. This issue is now closed.

Messages (3)
msg267365 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016-06-05 02:32
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\ 9:     warnings.warn("runningAsOSXApp() is deprecated, use isAquaTk()",
...\idlelib\ 11:     return isAquaTk()
...\idlelib\ 23:     isAquaTk(), isCarbonTk(), isCocoaTk()...
...\idlelib\ 39: def isAquaTk():
...\idlelib\ 226:     isAquaTk(), isCarbonTk(), isCocoaTk()...
...\idlelib\ 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.
msg267442 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2016-06-05 17:41
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.
msg267473 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016-06-05 20:40
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.
Date User Action Args
2019-03-23 04:15:12terry.reedysetassignee: terry.reedy
components: + IDLE
2016-06-05 20:40:10terry.reedysetstatus: open -> closed
resolution: not a bug
messages: + msg267473

stage: test needed -> resolved
2016-06-05 17:41:24ned.deilysetnosy: + ned.deily
messages: + msg267442
2016-06-05 02:32:32terry.reedycreate