Bug introduced in 10.3 or earlier and fixed in 11.1
Reproduced on Windows 7, 10
Bug confirmed by WRI:
[...] It does appear that the Saveable Notebook Option on Windows is not behaving properly, and I have forwarded an incident report to our developers with the information you provided. [...]
I'm having difficulties with programmatic creation of non saveable notebooks on Windows with V10.4.1. while I believe it was working in the past.
path = FileNameJoin[{$HomeDirectory, "Desktop", "test.nb"}];
Export[
path,
Notebook[{}, Saveable -> False ],
"NB"
]
NotebookOpen @ path;
Now write something there, menu item File > Save
is inactive but use Ctrl+S and close the notebook. Open again:
NotebookOpen @ path;
and the edited content is there. (that is unexpected)
With the setting
Saveable->False
, a notebook cannot be saved using File > Save or the equivalent keyboard shortcut.
On the other hand edited Help notebooks are not preserving changes....
What have I missed? How are they different?
Further investigation about Help notebooks.
As mentioned before, they appear to behave correctly. Also their menu is different than menu of just Saveable->False
notebook:
Save As..
item is pale too...
But go to any Help notebook and evaluate e.g:
path = FileNameJoin[{$HomeDirectory, "Desktop", "plotRef.nb"}]
CopyFile[ NotebookFileName[], path ]
NotebookOpen @ path
The same help notebook opened from desktop is not behaving correctly anymore!