Aric Gregson | 4 Mar 2009 00:11
Picon

Prevent Emacs from Killing R Window

Just wondering if there is a way to get ESS to require a confirmation
prior to killing a buffer that is running R? I just lost 3 hours of
workspace by hitting the wrong key combination. Fortunately, the work
is scripted, but this is very inconvenient. 

Thanks for any suggestions. 

aric

______________________________________________
ESS-help <at> stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help

Leo | 4 Mar 2009 01:11
Picon
Gravatar

Re: Prevent Emacs from Killing R Window

On 2009-03-03 23:11 +0000, Aric Gregson wrote:
> Just wondering if there is a way to get ESS to require a confirmation
> prior to killing a buffer that is running R? I just lost 3 hours of
> workspace by hitting the wrong key combination. Fortunately, the work
> is scripted, but this is very inconvenient. 
>
> Thanks for any suggestions. 
>
> aric

emacs-lock.el in emacs/lisp directory does what you want. But generally
you don't need it. My Emacs asks me before killing any process or
unsaved file.

Best,
--

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .: I use Emacs :.

______________________________________________
ESS-help <at> stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help

Susumu Tanimura | 4 Mar 2009 02:50
X-Face
Picon

auto-complete-mode

Hi list,

Today I found auto-complete.el that strongly helps us write text file.
Demo of auto-complete-mode is provided here
http://www.cx4a.org/pub/ac-demo/ac-demo.html

You can get it from http://www.cx4a.org/pub/auto-complete.el.

A quick trial of auto-complete-mode with R-mode showed
auto-complete-mode can work as a minor-mode for ESS without a problem.

However, in order to take full advantage of auto-complete-mode, it
seems to need keywords list of R or other related materials like
something shown in http://www.emacswiki.org/emacs/AutoComplete.

Are there anybody who has already written such settings of
auto-complete-mode for R?  Does anybody have an extension of
auto-complete.el like "auto-complete-R.el"?

Thanks,

--
Susumu

______________________________________________
ESS-help <at> stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help

Charles C. Berry | 4 Mar 2009 03:48

Re: Prevent Emacs from Killing R Window

On Tue, 3 Mar 2009, Aric Gregson wrote:

> Just wondering if there is a way to get ESS to require a confirmation
> prior to killing a buffer that is running R? I just lost 3 hours of
> workspace by hitting the wrong key combination. Fortunately, the work
> is scripted, but this is very inconvenient.

Yes. 'Disabling' the command. In the emacs info:

57.4.10 Disabling Commands
--------------------------

Disabling a command means that invoking it interactively asks for
confirmation from the user.  The purpose of disabling a command is to
prevent users from executing it by accident; we do this for commands
that might be confusing to the uninitiated.

Attempting to invoke a disabled command interactively in Emacs
displays a window containing the command's name, its documentation, and
some instructions on what to do immediately; then Emacs asks for input
saying whether to execute the command as requested, enable it and
execute it, or cancel.  If you decide to enable the command, you must
then answer another question--whether to do this permanently, or just
for the current session.  (Enabling permanently works by automatically
editing your `.emacs' file.)  You can also type `!' to enable _all_
commands, for the current session only.

.
.
.
(Continue reading)

Erik Iverson | 4 Mar 2009 03:53
Picon

Re: auto-complete-mode

Hello,

 > Today I found auto-complete.el that strongly helps us write text file.
 > Demo of auto-complete-mode is provided here
 > http://www.cx4a.org/pub/ac-demo/ac-demo.html

...snip...

 > Are there anybody who has already written such settings of
 > auto-complete-mode for R?  Does anybody have an extension of
 > auto-complete.el like "auto-complete-R.el"?

A month or so ago, I hacked together something for "intellisense"-type 
completion based on company-mode, a similar auto-complete Emacs package.  It 
worked relatively well, and as soon as it is polished, I'll post it here.  The 
way I went about it is to use the same completion mechanism that ESS uses, which 
you might look into in your case, too.  You can see how it is done in the ESS 
file essd-r.el, function ess-R-complete-object-name.

Also, see this recent thread on ESS-help, 
http://www.nabble.com/ESS-R-completion-UI-td21777981.html

I have not yet investigated the Icicles approach described in the thread above, 
but it looks very interesting, and is a TODO ...

Best,
Erik

______________________________________________
ESS-help <at> stat.math.ethz.ch mailing list
(Continue reading)

Susumu Tanimura | 4 Mar 2009 04:29
X-Face
Picon

Re: auto-complete-mode

Dear Erik,

Thanks the information, and am ashamed of myself that I could not find
the discussion about this issue in the list even a month ago.

I will check ess-R-complete-object-name in essd-r.el. But, since I am
so newbie, I had better wait Erik's work.

Best wishes,

--
Susumu

On Tue, 03 Mar 2009 20:53:55 -0600
Erik Iverson <iverson <at> biostat.wisc.edu> wrote:

> Hello,
> 
>  > Today I found auto-complete.el that strongly helps us write text
>  > file. Demo of auto-complete-mode is provided here
>  > http://www.cx4a.org/pub/ac-demo/ac-demo.html
> 
> ...snip...
> 
>  > Are there anybody who has already written such settings of
>  > auto-complete-mode for R?  Does anybody have an extension of
>  > auto-complete.el like "auto-complete-R.el"?
> 
> A month or so ago, I hacked together something for "intellisense"-type 
> completion based on company-mode, a similar auto-complete Emacs
(Continue reading)

Aric Gregson | 4 Mar 2009 06:13
Picon

Re: Prevent Emacs from Killing R Window

--On March 3, 2009 6:48:19 PM -0800 "Charles C. Berry" 
<cberry <at> tajo.ucsd.edu> wrote:

[snip]
> I disable a bunch of commands that have keystrokes that my clumsy fingers
> often inadvertently type.

Thanks very much. I'll look into the Disable command as I have the same 
issue. It is most inconvenient to accidentally close your R session.

Aric

______________________________________________
ESS-help <at> stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help

Patrick Connolly | 4 Mar 2009 10:35
Picon

List of ESS functions

Over the years, I've collect many bits I've added to my .emacs file
such as these:

(global-set-key [f8] 'ess-switch-to-end-of-ESS)
(global-set-key [f9] 'ess-switch-to-ESS)
(global-set-key [f7] 'comment-region)
(global-set-key [S-f7] 'uncomment-region)

I've been trying to work out how to make the mini-buffer as tool-tips
remain until the function call is finished and it would help if I knew
what sort of thing can be done.  This list has had reference to using
(require 'ess-eldoc) but there's something about the context in which
it's used I haven't sussed out yet.

Where does one find a list of things such as "ess-switch-to-ESS"?
I've never quite managed to get my head around how the Emacs help
system works.  M-x apropos-documentation has way too much and I've not
worked out how to subset it to get what refers to ess specific bits.
(Searching for "ess" brings up every reference to "message" so that's
not much use.

I'm using ESS 5.3.11 and R-2.8.1 on a Fedora/Centos type platform.

TIA

--

-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___    Patrick Connolly   
 {~._.~}                   Great minds discuss ideas    
 _( Y )_  	         Average minds discuss events 
(Continue reading)

markleeds | 4 Mar 2009 19:13
Picon

ess on windows question

Hi ESS Gurus: I'm starting to use R for windows ( strictly I've been a 
linux user ) and I downloaded Vincent Goulet's Emacs-Ess version and 
also his .emacs file. ( Thank you, vincent for everytihng that you 
provide ). Then,  I start up emacs  by doing

A) emacs test.R

B) split the window in 2 to have my ess ession on the bottom ( as I do 
in linux ).

C) do Esc X R to start ESS in the bottom but I get a long delay whre it 
sits with a press C H-m for help ESS whatever version and then finally 
the following message in the window at the top.

ess-error: Timeout waiting for prompt. Check inferior-ess-prompt or 
ess-loop-timeout.

I don't know Lisp at all and my guess is that my .emacs file isn't quite 
right but I
have no idea how to fix it.

Also,  I 'm not at home so I don't  have my linux .emacs file with me to 
try that out. So, If someone has a .emacs file that makes the slider 
work correctly so that when you run R commands in the top their output 
show up at the bottom of the other screen ( so that one doesn't have to 
manually scroll down to see them ), that's the only thing I really want 
in the .emacs file anyway. I'm a very basic ess-user. Thanks a lot for 
anything anyone can
provide.

(Continue reading)

markleeds | 4 Mar 2009 21:21
Picon

mistake in my previous ess question

I was mistaken. The error message that I was getting was due to an bad 
character in
.RProfile file. So now the .emacs file is getting executed without a 
glitch but I think
there are no commands in there for dealing with the scrolling weirdness 
I referred to
earlier so if anyone has code for fixing that, it's appreciated.

The scrolling weirdness that I'm referring to is where you do control cc 
of an R region and
the commands go to the bottom but to really see them outputted you have
to go to the other window and scroll the slider down. I had this same 
problem on
linux and someone sent me code for .emacs file that fixed it. Thanks.

______________________________________________
ESS-help <at> stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Gmane