[ESS] Show toolbar only when using R

Erik Iverson eriki at ccbr.umn.edu
Tue Mar 23 17:26:45 CET 2010

>> What I'm hoping for, though, is a way to hide all toolbar buttons 
>> (whether
>> default or otherwise) when editing anything other than a .R file.  
>> That is,
>> when I'm editing  a .R file, I want tool-bar-mode to be active; when I'm
>> doing anything else, I want tool-bar-mode to be inactive.
>> Thanks again,
>> Daniel
> Ok, I get it now, but I have no idea how you might do this.  It is 
> certainly possible since emacs is seemingly infinitely configurable. 
> But, I think you are on your own.

I have the following in my .emacs:

(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))

This gets rid of the toolbar for everything.  I imagine you'd have to 
add (tool-bar-mode 1) to a hook somewhere, and since I imagine 
tool-bar-mode is not per buffer, you'd have to turn it off every time 
you switched buffers, with another hook function.

My advice is:

Turn if off always and force yourself to learn all the keyboard 
shortcuts, it's worth it in the long run!


More information about the ESS-help mailing list