[Rd] options("quit.with.no.save"), and Windows installer changes

Duncan Murdoch murdoch at stats.uwo.ca
Tue Jul 4 17:40:42 CEST 2006


On 7/4/2006 11:15 AM, Martin Maechler wrote:
>>>>>> "Duncan" == Duncan Murdoch <murdoch at stats.uwo.ca>
>>>>>>     on Tue, 04 Jul 2006 08:32:08 -0400 writes:
> 
>     Duncan> I've just committed a couple of changes to R-devel related to requests 
>     Duncan> at userR about the Windows installer.  The first of these affects all 
>     Duncan> platforms, but I've only tested it on Windows:
> 
>     Duncan> I added an option "quit.with.no.save".  If TRUE,
>     Duncan> then the default q("ask") prompt will not offer to
>     Duncan> save the workspace.  This is in response to the
>     Duncan> observation that new users who are instructed not to
>     Duncan> save their workspace, get confused when they
>     Duncan> accidentally answer Yes to the prompt to save it.
> 
> Ok...  but I probably misunderstand a bit:
> 
> The default has not been   q(save = "ask") but  q(save = "default"),
> and that default has depended on startup.
> 
> Even now, "R --no-save"  already did have the desired effect,
> on Unix at least.  For my ESS setup, I have made this an automatic
> default many months ago.
> 
> Wouldn't it be easier and sufficient to make "--no-save" a
> working option on all platforms ?
> Or is the point really about changing the quitting dialog?
> For me quitting *without* a dialog is the most important thing
> which I use (often several times a day).

Yes, that's the point.  In the Windows GUI it's pretty easy to quit by 
mistake (click on the Close button, which sits right next to the 
Maximize button on the window frame).  It would not be a good idea if 
this resulted in the immediate loss of the workspace, so Windows 
programs normally warn if there will be a loss of data when quitting.

> 
>     Duncan> I'm not sure about the wording of the user prompt
>     Duncan> question, which is now "Quit and discard
>     Duncan> workspace?".  The problem with this wording is that
>     Duncan> someone who automatically hits "y" will lose their
>     Duncan> work.  I've tried on Windows to make the dialog box
>     Duncan> look different enough that they should be warned.
> 
> good!
> 
>     Duncan> I haven't made any change to the Mac GUI to support this.  On 
>     Duncan> Unix-alikes, the text prompt should respect this option.
> 
>     Duncan> The other change is to the Windows installer, to
>     Duncan> allow the user to choose whether to set
>     Duncan> quit.with.no.save, MDI/SDI display, and help style
>     Duncan> at install time.  The only (intentional) change to
>     Duncan> the current behaviour is to default to CHM help
>     Duncan> instead of plain text.
> 
> People have asked me in private about this, and I didn't know
> the answer:
> Is it true that this means that people can no longer commit the
> "cheap package install trick" on Windows for  R-code-only
> packages?
> Namely
>   1) install a source package on a Linux/Unix/MacOSX machine
>      (where it is often simple to have all the necessary tools available)
>   2) zip the resulting installed package
>   3) unzip it on the target Windows machine into the corresponding
>      library (directory).

I don't know what currently happens if you do that, but I can't see how 
it would work for anyone who sets options(chmhelp=TRUE).  People who 
build binary packages should use the appropriate tools to do it.

There is something called "chmlib" available for Linux, but I've got no 
idea whether it is usable.

> Of course, this trick will not provide any *.chm help files.
> Will the cheap-installed package still work, using the *.txt (or
> *.html) help files?

Show me one and I'll tell you what happens.  I think it would be 
reasonable behaviour to default to the text help in a case like this, 
but I don't know if that would be easy.  I do tend to think a patch like 
that should come from someone who chooses not to use the tools we 
provide for doing proper package builds.

>     Duncan> These changes will show up in builds based on
>     Duncan> revision 38480 or later.
> 
>     Duncan> Duncan Murdoch
> 
> Thanks a lot, Duncan!
> 
> 
>     Duncan> ______________________________________________
>     Duncan> R-devel at r-project.org mailing list
>     Duncan> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list