This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients JayKrish, Saimadhav.Heblikar, Todd.Rovito, jesstess, ned.deily, rhettinger, roger.serwy, serhiy.storchaka, taleinat, terry.reedy
Date 2014-08-16.21:18:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1408223931.88.0.511535279054.issue17535@psf.upfronthosting.co.za>
In-reply-to
Content
I believe the line number behavior Ned describes is the same as the Code Context behavior.  I just tested the latter to verify Saimadhav's email report. I think both *should* be the same.

The docs say Code Context is a toggle. However, it does not mention the checkmark or the initial state of new windows. Clicking Code Context toggles the state of the current window only; I think this is proper. I also want that for line-numbering.

It also toggles the initial state of future windows, as indicated by the checkmark.  In other words, the checkmark does NOT indicate the state of the current window, which is visually obvious anyway.  Instead, it indicates the initial state of new windows, and it the latter that is saved across sessions.  This behavior may not be expected, but given the alternatives*, I consider it plausible if not designed. It definitely needs to be documented. 

* So what are the alternatives?

1. Make the checkmark toggle local to the window, as you expected. But then what would be the initial state of new windows (and saved as such)?  One solution would be two Code Context options, one for current window (checkmark not really needed) and another for future windows (saved). The current design cleverly combines two buttons into one. Perhaps it is too clever, but I don't like two buttons either. Another solution would be to just use whatever is in config default+user. This would be more palatable once we add a config-extension dialog. But it would still be more of a nuisance than the current within-session switching.

2. Make the window toggle global to all current windows.  I suspect that this would be visually obnoxious.  If someone hated Context/Numbering and only turned either on temporarily, intended for one window, out of necessity, it would be behaviorally obnoxious.  There may also have been a performance consideration that is somewhat but not totally obsolete.

The feature was added in #936169 in 2005. AFAIK, there have been no complaints. There are none I could find on the tracker. So my inclination is to commit Line Numbering with the same menu behavior as Code Context.  If we ever want to change (both), that should be a new issue and discussion.  Tal, you were involved in #936169. Any comments?
History
Date User Action Args
2014-08-16 21:18:51terry.reedysetrecipients: + terry.reedy, rhettinger, taleinat, ned.deily, roger.serwy, jesstess, Todd.Rovito, serhiy.storchaka, JayKrish, Saimadhav.Heblikar
2014-08-16 21:18:51terry.reedysetmessageid: <1408223931.88.0.511535279054.issue17535@psf.upfronthosting.co.za>
2014-08-16 21:18:51terry.reedylinkissue17535 messages
2014-08-16 21:18:51terry.reedycreate