Author terry.reedy
Recipients cheryl.sabella, terry.reedy
Date 2018-05-24.22:54:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Cheryl, you are right.  The extension-feature conversion made this issue mostly obsolete.  Editors start without code context and the menu only toggles the current window.

If I had thought about it, I would have closed this or added an update last fall.  And I should have retested this yesterday.  The differences from what I proposed above are more or less intentional.  So don't write a patch until we agree on a list of changes.

I re-read #17535, msg225416, 2014-08-16 17:18, where this started, but not the discussions on the tracker and PR about the conversion details.

MENU has no checkmark: I noted on msg225416 that the checkmark never indicated the current state of the current window and that there was hardly any need to keep it and change its meaning, because the current state of the current window is plainly visible.  I am currently inclined to leave it off.  Instead, I would like to prefix 'Code Context' with 'Toggle'.  What do you think?  Whatever we do would be a precedent for other local options, such as a line number toggle, both on this menu and a context menu.

Since the effect of 'Code Context' is only local and not global, there should at least be a line separator after the global settings entry.  I might even like a dummy entry such as 'Current window:' after the line.

Local options should also be on the right-click context menu.  Based on my experience with using breakpoints, I want to try replacing the current line options 'Set Breakpoint' and 'Clear Breakpoint' with 'Toggle Breakpoint'.  'Toggle Code Context' would go with this.  

Initial presence of CC in new windows: config-extensions.def has
  numlines= 3
  visible= False
'numlines' is read and used.  'visible' is ignored.  To be sure, I added 'visible=True' to config-extensions.cfg and it made no difference.

To enable CC defaulting to on for new editors, we would add a checkbox "[ ] Initially Visible" after the "Context lines   [ ]" box on the General tab, much like the "[ ] Bell on Mismatch" above on the same tab.  Saving changes would be the same.  The added wiring would be a bit different.

This would not be re-enabling anything that properly worked before the conversion.  One had to enable the feature, turn on 'visible' and then either never use the toggle or go back through the dialog to turn on 'visible' after the toggle turned it off.  Then, once one had CC running, there was the tradeoff between too many blank lines and too few real context lines.  I suspect most people left CC disabled even after trying it out.

I don't feel it a rush to add this option until it is plausibly something someone might do.  The aim of #33610 is to make this be true.  In any case, this might be better as a PR separate from fiddling with the menus.

I intentionally did not say 're-enable' 
As I remember, I did not do this because I could not believe that much of anyone was intentionally setting visible=True, at least for very long.  using this option.  Having too many blank lines

Open editor, no cc. Toggle, cc. Open another editor, no cc.

Close IDLE.  Add the following .idlerc/config-extensions.cff.
visible= True
OpenIDLE, open editor, no cc.
Date User Action Args
2018-05-24 22:54:32terry.reedysetrecipients: + terry.reedy, cheryl.sabella
2018-05-24 22:54:32terry.reedysetmessageid: <>
2018-05-24 22:54:32terry.reedylinkissue22703 messages
2018-05-24 22:54:32terry.reedycreate