Skip to content

ESC key and STOP button not working in R 2.14.1

9 messages · Ken Knoblauch, ysw, Hans-Jörg Bibiko +2 more

#
I find that the ESC key for aborting a line of code or stopping
execution and also the STOP button are not working in R 2.14.1.
I thought that this might be a Lion related issue as I updated
both my OS and R version at the same time but I see the problem
on an older machine running Snow Leopard, too.  I can't give
an example.  Just write a line of code and hit escape before
you hit return.  This used to abort the command.  Was this a
bug earlier that is fixed, or is it a feature that can be
restored?  Thanks, in advance.

Here is the session info.

R version 2.14.1 Patched (2012-01-08 r58078)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

Happens on 32-bit R, also.

best wishes,

Ken
#
On 09.01.2012, at 12:45, Ken Knoblauch wrote:

            
Hi Ken,

yes - the ESC behaviour was slightly changed/improved.

Pressing ESC while R is EXECUTING R code including statements like "system('foo', wait=T) will try to interrupt the R code AND kill 'foo' resp.

If R isn't executing something ESC invokes completion since this is the standard Mac app behaviour.

You wrote: "Just write a line of code and hit escape before you hit return.  This used to abort the command."

Well, it did not abort the command since the command wasn't executed yet, it only cleared the current command line buffer which differs from the actual intention of pressing ESC => 'Interrupt current R computation' I think.

To get the 'old' behaviour you can press ??? (standard short-cut to select from cursor position to start of line) if your cursor is at the end of the current line to select what you've already written and start typing again.


Kind regards,
--Hans
#
Thanks, Hans,

That works for clearing the line.  I should have looked at the NEWS for
the R.app GUI:

Last-update: 2011-12-22 [HJBB]
*	In RConsole pressing the ESC key will invoke
	"completion" as in standard application if no
	R command runs including system(..., wait=TRUE)
	otherwise pressing ESC key or STOP button will
	try to terminate the running R command and, if
	a system(..., wait=TRUE) runs, it will kill the
	system command

but how about if I have an uncompleted command, i.e. with + prompt.
ESC used to jump out of that and it doesn't nor does ??? seem
to work?  Thanks, again.

best,

Ken

Quoting Hans-J?rg Bibiko <bibiko at eva.mpg.de>:

  
    
#
On 09.01.2012, at 14:28, Ken Knoblauch wrote:

            
I've to admit your point. I fine-tuned that behaviour in such a way that if R prompts : "+ " the user has the chance to abort the current uncompleted command by pressing ESC to be able to jump out of it.

Many thanks for the hint!

Cheers,
--Hans
10 days later
ysw
#
Hi Hans,

I am wondering if there will be a way to customize this behavior. I am
kind of used to using TAB for completion and ESC for clearing the
current line :)

Saiwing
On Jan 9, 10:14?pm, Hans-J?rg Bibiko <bib... at eva.mpg.de> wrote:
#
On 19 Jan 2012, at 15:15, ysw wrote:

            
The old but improved behaviour was recovered in the last built without having the chance to customise.

Cheers,
--Hans
ysw
#
I see. Thanks!

Saiwing
On Jan 20, 2:06?am, Hans-J?rg Bibiko <bib... at eva.mpg.de> wrote:
7 days later
1 day later
#
On Jan 27, 2012, at 3:46 PM, Eliot wrote:

            
Yes, the most recent GUI is back to the old behavior.

Cheers,
S