Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Wacek Kusnierczyk
Barry Rowlingson wrote:
 Would something like

   q()
  Save workspace image (/home/me/workspace/.RData)? [y/n/c]:

  be useful to anyone else? Just thought I'd ask before I dive into
 internals or wrap the q function for myself.
   


yes, it would be very useful to me.

vQ

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Duncan Murdoch

On 05/06/2009 7:53 AM, Barry Rowlingson wrote:

When I quit R, it says:

  q()
 Save workspace image? [y/n/c]:

 and since I've probably got 3 R sessions running in however many
different directories and I might have jumped around with setwd() , I
forget exactly where R wants to save its workspace image. So could q()
be changed to say what file it is going to save to before it does?

 Currently I have to hit 'c', then do getcwd(), then quit again.
Would something like

  q()
 Save workspace image (/home/me/workspace/.RData)? [y/n/c]:

 be useful to anyone else? Just thought I'd ask before I dive into
internals or wrap the q function for myself.


That sounds like a great suggestion.  I might word it as

Save workspace to /home/me/workspace/.RData? [y/n/c]

If people are working deep in a directory tree, the path might end up 
too long; you might want to think about limiting it (e.g. by leaving off 
the root).


Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Show location of workspace image on quit?

2009-06-05 Thread Barry Rowlingson
When I quit R, it says:

  q()
 Save workspace image? [y/n/c]:

 and since I've probably got 3 R sessions running in however many
different directories and I might have jumped around with setwd() , I
forget exactly where R wants to save its workspace image. So could q()
be changed to say what file it is going to save to before it does?

 Currently I have to hit 'c', then do getcwd(), then quit again.
Would something like

  q()
 Save workspace image (/home/me/workspace/.RData)? [y/n/c]:

 be useful to anyone else? Just thought I'd ask before I dive into
internals or wrap the q function for myself.

Barry

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Mathieu Ribatet
I guess that having something like this
 q()
 Save workspace image (/home/me/workspace/.RData)? [y/n/c/e]:

where e means Editing the path should be clear enought, isn't it?

Best,
Mathieu

Le vendredi 05 juin 2009 à 14:36 +0200, Wacek Kusnierczyk a écrit :
 Duncan Murdoch wrote:
  On 05/06/2009 7:53 AM, Barry Rowlingson wrote:
  When I quit R, it says:
 
q()
   Save workspace image? [y/n/c]:
 
   and since I've probably got 3 R sessions running in however many
  different directories and I might have jumped around with setwd() , I
  forget exactly where R wants to save its workspace image. So could q()
  be changed to say what file it is going to save to before it does?
 
   Currently I have to hit 'c', then do getcwd(), then quit again.
  Would something like
 
q()
   Save workspace image (/home/me/workspace/.RData)? [y/n/c]:
 
   be useful to anyone else? Just thought I'd ask before I dive into
  internals or wrap the q function for myself.
 
  That sounds like a great suggestion.  I might word it as
 
  Save workspace to /home/me/workspace/.RData? [y/n/c]
 
 but then what would happen if you choose 'n'?  i'd expect a prompt for
 another path --  and i'd suspect this is what others would expect, too. 
 with the message as barry suggests, exiting without saving is the most
 natural thing, which is what happens in the current implementation. 
 
 if you insist on your version, it would be better, i think, to change
 the behaviour, too.
 
 
 vQ
 
 __
 R-devel@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel
-- 
Institute of Mathematics
Ecole Polytechnique Fédérale de Lausanne
STAT-IMA-FSB-EPFL, Station 8
CH-1015 Lausanne   Switzerland
http://stat.epfl.ch/
Tel: + 41 (0)21 693 7907

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Wacek Kusnierczyk
Mathieu Ribatet wrote:
 I guess that having something like this
   
 q()
 Save workspace image (/home/me/workspace/.RData)? [y/n/c/e]:
 

 where e means Editing the path should be clear enought, isn't it?
   

good idea;  maybe 'o' for 'other path';  or 'a' for 'alternative path'; 
or 'd' for 'different path'; or 'm' for 'modify path';  or 'p' for
'path';  or... ?


vQ

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Ronggui Huang
I think e is better than others.

Ronggui

2009/6/5 Wacek Kusnierczyk waclaw.marcin.kusnierc...@idi.ntnu.no:
 Mathieu Ribatet wrote:
 I guess that having something like this

 q()
 Save workspace image (/home/me/workspace/.RData)? [y/n/c/e]:


 where e means Editing the path should be clear enought, isn't it?


 good idea;  maybe 'o' for 'other path';  or 'a' for 'alternative path';
 or 'd' for 'different path'; or 'm' for 'modify path';  or 'p' for
 'path';  or... ?


 vQ

 __
 R-devel@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel




-- 
HUANG Ronggui, Wincent
PhD Candidate
Dept of Public and Social Administration
City University of Hong Kong
Home page: http://asrr.r-forge.r-project.org/rghuang.html

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Barry Rowlingson
On Fri, Jun 5, 2009 at 1:46 PM, Mathieu Ribatetmathieu.riba...@epfl.ch wrote:
 I guess that having something like this
 q()
 Save workspace image (/home/me/workspace/.RData)? [y/n/c/e]:

 where e means Editing the path should be clear enought, isn't it?

 'e' might be thought to mean 'exit' in English, which makes me think
we also need to make sure this can all be translated. Maybe 'p' for
path? Or 'e' for 'elsewhere'? This is getting tricky :)

 I think I'd rather leave off the 'e' option for simplicity - if the
user wants to save elsewhere they can hit 'c' and do save() or
setcwd()  themselves, I'm not sure we need to put extra functionality
into the q function.

Barry

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Duncan Murdoch

On 6/5/2009 9:46 AM, Barry Rowlingson wrote:

On Fri, Jun 5, 2009 at 1:46 PM, Mathieu Ribatetmathieu.riba...@epfl.ch wrote:

I guess that having something like this

q()
Save workspace image (/home/me/workspace/.RData)? [y/n/c/e]:


where e means Editing the path should be clear enought, isn't it?


 'e' might be thought to mean 'exit' in English, which makes me think
we also need to make sure this can all be translated. Maybe 'p' for
path? Or 'e' for 'elsewhere'? This is getting tricky :)

 I think I'd rather leave off the 'e' option for simplicity - if the
user wants to save elsewhere they can hit 'c' and do save() or
setcwd()  themselves, I'm not sure we need to put extra functionality
into the q function.


An alternative to think about is to report where the file was saved, 
rather than tease the user by suggesting s/he has a choice.  This is a 
bit harder in the GUIs, but would be very easy in a console, just print 
the path after quitting:


Save workspace image? [y/n/c]: y
Image saved to /home/me/workspace/.RData

In the Windows GUI you could pop up a dialog box to say this, with a 
checkbox saying don't show me this next time.


Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Gabor Grothendieck
On Fri, Jun 5, 2009 at 9:43 AM, Wacek
Kusnierczykwaclaw.marcin.kusnierc...@idi.ntnu.no wrote:
 Mathieu Ribatet wrote:
 I guess that having something like this

 q()
 Save workspace image (/home/me/workspace/.RData)? [y/n/c/e]:


 where e means Editing the path should be clear enought, isn't it?


 good idea;  maybe 'o' for 'other path';  or 'a' for 'alternative path';
 or 'd' for 'different path'; or 'm' for 'modify path';  or 'p' for
 'path';  or... ?

or perhaps clearer:

Save workspace to /home/me/workspace/.RData? [ y(es) / (n(o) /
c(ancel) / o(ther) ]:

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Prof Brian Ripley
Any change here is not so simple to implement as to propose: this is 
not something in the R engine, but part of the clean-up action in the 
front end.  That means that there are at least 3 versions to handle in 
the standard front ends (and that for R.app is not in the main source 
tarball).  And at least two of them is offered for translation so 
there are many copies.  Then there are other front-ends such as JGR 
and RKward 


I hope people proposing this will offer complete patches.

On Fri, 5 Jun 2009, Duncan Murdoch wrote:


On 6/5/2009 9:46 AM, Barry Rowlingson wrote:
On Fri, Jun 5, 2009 at 1:46 PM, Mathieu Ribatetmathieu.riba...@epfl.ch 
wrote:

I guess that having something like this

q()
Save workspace image (/home/me/workspace/.RData)? [y/n/c/e]:


where e means Editing the path should be clear enought, isn't it?


 'e' might be thought to mean 'exit' in English, which makes me think
we also need to make sure this can all be translated. Maybe 'p' for
path? Or 'e' for 'elsewhere'? This is getting tricky :)

 I think I'd rather leave off the 'e' option for simplicity - if the
user wants to save elsewhere they can hit 'c' and do save() or
setcwd()  themselves, I'm not sure we need to put extra functionality
into the q function.


An alternative to think about is to report where the file was saved, rather 
than tease the user by suggesting s/he has a choice.  This is a bit harder in 
the GUIs, but would be very easy in a console, just print the path after 
quitting:


Save workspace image? [y/n/c]: y
Image saved to /home/me/workspace/.RData

In the Windows GUI you could pop up a dialog box to say this, with a checkbox 
saying don't show me this next time.


Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Barry Rowlingson
On Fri, Jun 5, 2009 at 3:01 PM, Gabor
Grothendieckggrothendi...@gmail.com wrote:



 Save workspace to /home/me/workspace/.RData? [ y(es) / (n(o) /
 c(ancel) / o(ther) ]:

 Quitting emacs produces this:

Save file /foo/bar/baz.qux? (y, n, !, ., q, C-r, d or C-h)

 I'm not sure what any other than the first two do. I don't think I've
ever used them. Plus there's no mention of the option I usually do
when I hit save accidentally, which is C-g (the emacs generic 'panic'
button). I don't think I'd want R's quit function to be so verbose.

Barry

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Gabor Grothendieck
On Fri, Jun 5, 2009 at 11:52 AM, Barry
Rowlingsonb.rowling...@lancaster.ac.uk wrote:
 On Fri, Jun 5, 2009 at 3:01 PM, Gabor
 Grothendieckggrothendi...@gmail.com wrote:



 Save workspace to /home/me/workspace/.RData? [ y(es) / (n(o) /
 c(ancel) / o(ther) ]:

  Quitting emacs produces this:

 Save file /foo/bar/baz.qux? (y, n, !, ., q, C-r, d or C-h)

  I'm not sure what any other than the first two do. I don't think I've
 ever used them. Plus there's no mention of the option I usually do
 when I hit save accidentally, which is C-g (the emacs generic 'panic'
 button). I don't think I'd want R's quit function to be so verbose.


The problem isn't really verbosity --- the problem is that one has no
idea what the options all mean.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel