From murdoch at stats.uwo.ca  Wed Jul  5 02:11:58 2006
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Tue, 04 Jul 2006 20:11:58 -0400
Subject: [Rd] options("quit.with.no.save")
In-Reply-To: <81A89161-0B7A-4753-8DEB-670CAE80BBCF@r-project.org>
References: <44AA5FC8.9020106@stats.uwo.ca>
	<17578.34324.125621.658439@stat.math.ethz.ch>
	<1D457B6B-1F1D-4FC0-929B-323E0E3A8CDB@r-project.org>
	<44AAC3B7.2080801@stats.uwo.ca>
	<81A89161-0B7A-4753-8DEB-670CAE80BBCF@r-project.org>
Message-ID: <44AB03CE.6080909@stats.uwo.ca>

On 7/4/2006 7:43 PM, Simon Urbanek wrote:
> On Jul 4, 2006, at 3:38 PM, Duncan Murdoch wrote:
> 
>>> I agree - it would be even nicer if there was a way to enable -- 
>>> no- save with some environment variable ...
>> Environment variables in Windows are a mess.  Doing things on the  
>> command line or through option() is a lot easier.
>>
> 
> Although I disagree (about the mess), I was thinking mainly about  
> unix here - I'd simply love to put something in my .profile that will  
> prevent the annoying question ;).

Put in an alias for R that adds --no-save?

>>> However, I think Duncan's approach is a very bad idea, because it   
>>> means that with the same answer will give you opposite result.  
>>> This  is a big UI no-no. (Windows users may may think it's a valid  
>>> option,  because Microsoft tends to do stupid things like that,  
>>> but that's  only because they never think about UI).
>> I agree that that is a problem.  However, I don't know a better  
>> solution:
>>   - I want to make it hard for the user to accidentally create a  
>> saved workspace.  Just changing the default will mean that people  
>> who habitually answer "yes" will still get the wrong result.
> 
> I would argue that if someone 'habitually' ignores the default and  
> selects yes, then it's his/her deliberate choice and likely not a new  
> user, because a new user doesn't yet have such a habit - to the  
> contrary, new users are the one most likely influenced by defaults.
> 
> 
>>   - I want to make it hard for the user to accidentally lose a  
>> workspace.  Hence --no-save is not an option.
>>
>> The problem with my solution as it stands is that people who  
>> habitually answer "yes" will sometimes accidentally lose a workspace.
>>
> 
> .. and for the reason you stated I think that's a major problem!
> 
> 
>>> The correct approach is to change the default button, but  
>>> definitely  not the dialog box.
>> I don't think this is sufficient.
>>
> 
> 
> Your solution may possibly be more efficient in solving the problem  
> you described, but IMHO it causes a much bigger problem. I'd still  
> prefer one save too many that any loss of data.

I was actually agreeing with you :-).  I'm going to revert the 
quit.with.no.save addition.  I'm not sure what should go in instead, but 
I think it's not just a rewording of the same sort of option.

As you said in your other message, the problem isn't really the 
unnecessary save. That wastes a bit of disk space, but provides some 
insurance against accidental data loss.  The problem is the auto-load on 
startup.

I could have the installer put the --no-restore on the Rgui command 
line, but it would be cleaner to put something in the default Rprofile 
file.  Then the user could override it in their private .Rprofile or by 
putting something on the command line.

At the same time, I could add an option to hold a default value for the 
save parameter of q(), so q() could be q("no") for you.

What do you think of that?  What would you name these two options?

Duncan Murdoch



[Rd] options("quit.with.no.save")
Duncan Murdoch