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 bsherwood, roger.serwy, terry.reedy
Date 2013-09-17.17:20:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The General tab of the IDLE Preferences dialog has this section with two radiobuttons:

Autosave Preferences
At Start of Run (F5)  () Prompt to Save   () No Prompt

The latter option actually means "No prompt unless the window is a new window ('Untitled') that has never been saved." In the latter case, there is a prompt anyway.

This issue proposes that the current No Prompt option be more truthfully labelled and that a true no-prompt option be added. Currently in .cnf configuration files, autosave = 0 or 1. The new option would be 2 ('really true' ;-).

The motivation is to provide a default scratch file for throwaway code and thereby encourage more use of the editor even for single multi-line statements, which are harder to edit in the Shell than single-line statements. The behavior of Untitled windows would not otherwise change.

Possible dialog forms

Autosave Preferences
When Running (F5) a window with unsaved changes, prompt to save
() Always   () Only for Untitled    () Never

I find it slightly confusing that Autosave yes is selected in the negative with 'no prompt'. An alternative:

Autosave Preferences
When Running (F5) a window with unsaved changes,
autosave instead of prompting to save
() Never   () Always except for Untitled    () Always

Another alternative is to retitle the section

Prompt to Save versus Autosave
When Running (F5) a window with unsaved changes, prompt to save
() Always   () Only for Untitled    () Never

However the dialog is worded, the new option would mean that unsaved new windows would be autosaved on Run to .idlerc/ (I picked this directory because it already contains 4 per-user files, including recent-files.lst, and has to be writable.) This would be a common scratch file for all Untitled windows.

The particular Untitled window saved should not be 'associated' with that path. Its title would not change to ''. Idle allows only one edit window per disk file (path) but allows multiple Untitled windows not associated with any path.

The 'unsaved' flag on the window would not be cleared, so that closing the window would still bring up the 'save this untitled window' message box. (The alternative would be to clear it, but unclear it if any other Untitled window were saved.)

The full path to would be added (or moved) to the top of the Recent Files list, just as with any other file. The file could then be retrieved (if not overwritten) in a later session. This would be particularly useful if running it caused a crash or freeze.

This proposal is based on Bruce Sherwood's vague description of a feature coded by G. Polo. I could not find a tracker issue for it. One apparent difference is that I propose adding a third option to the existing set instead of a new binary option. I have no idea whether Polo proposed to silently save the file (as I propose) or add a mechanism to truly run without saving (which is how a user will see it unless they look at Recent Files). In any case, my proposal is for a pretty minimal change. I believe it would take extra code to prevent the Recent Files listing.
Date User Action Args
2013-09-17 17:20:54terry.reedysetrecipients: + terry.reedy, bsherwood, roger.serwy
2013-09-17 17:20:54terry.reedysetmessageid: <>
2013-09-17 17:20:53terry.reedylinkissue19042 messages
2013-09-17 17:20:53terry.reedycreate