[ESS] Customizing ESS: change color background and shortcuts to evaluate line or region

Kasper Daniel Hansen khansen at stat.Berkeley.EDU
Wed Jul 9 04:44:14 CEST 2008


This is what I use for colours. If you use different frames (probably  
what you think of as windows), you might want to do this more  
complicated.

(set-cursor-color "red")
(set-foreground-color "green")
(set-background-color "black")

I disagree with Rodney's comment on not rebinding F1 and F2.

This is what I use to rebind ALT+F1
(global-set-key (kbd "<M-f1>") 'mac-resize-display)

(the function mac-resize-display is something I wrote myself).

Setting the size could be done with something like
(set-frame-size (selected-frame) 140 65)
The numbers are width x height and are in characters. I don't think  
you can easily specify it in points from inside of emacs, there you  
might need to play with your window manager and that could be hard.

Finally (if this has any interest) you can set the position by
(set-frame-position (selected-frame) 10 10)
This is (x,y) position of the window (upper left corner), this time in  
points.

Kasper

On Jul 8, 2008, at 5:30 AM, Judith Flores wrote:

> Hello,
>
>    I have been looking for the appropriate command to
> customize a few things of ESS. I would like to change the background
> and font colors. I also would like to enlarge the width size of  
> display
> when running R within emacs. And finally I added the following  
> commands
> to use the keys F1 and F2 to evaluate one line a region, respectively,
> but it seems I am missing something.
>
> (global-set-key [f1] 'ess-eval-line)
> (global-set-key [f2] 'ess-eval-region)
>
>
>    Right now my .emacs file only loads ess-site.el. Any hints or  
> help will be greatly appreciated.
>
> Thank you,
>
> Judith
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help




More information about the ESS-help mailing list