Thanks to all of you for the many answers. I tried them and it works well. Regarding ESS: yes, I use it. That's why I wanted to enlarge the frame, because when I start R and ESS I use a frame of the width of the screen with the syntax window on the left and the process buffer on the right. Then I switch from script to process buffer and back by function keys, always enlarging the window I am working on. In other cases I use a frame with 80 columns width.
Regarding David's hint to use gnu.emacs.help, I will observe it. Just one remark. Now, knowing the functions set-frame-width and similar I searched again for them in the help because I wondered why I did not find them before. C-h a with set-frame shows set-frame-font and set-frame-name, but nothing else. Also in the manual I found only these two functions. For me this is surprising, because C-h f set-frame-width shows the function. The Emacs Lisp Reference Maual describes set-frame-width and similar. This however I read only partially until now. Following a hint from David I tried M-x apropos and this way I found set-frame-size. Now reading more carefully I understood that M-x apropos is not equivalent to C-h a. Again thanks to all, Heinz At 08:49 29.12.2005 -0700, Sarir Khamsi wrote: >Heinz Tuechler <[EMAIL PROTECTED]> writes: > >> not being an expert of Emacs, I could not find a way to change the size of >> an existing frame by a function. >> I know to set the initial size by initial-frame-alist. Is there a similar >> function to change an existing frame? >> I would like to enlage the frame, in case I run R from within Emacs. At the >> moment, I do this by creating a new frame, but may be, there is a better >> method. > >I use this in my ~/.emacs: > >(defun sk-grow-frame-height (&optional increment frame) > "Increase the height of FRAME (default: selected-frame) by INCREMENT. >Interactively, INCREMENT is given by the prefix argument." > (interactive "p") > (set-frame-height frame (+ (frame-height frame) increment))) > >(defun sk-grow-frame-width (&optional increment frame) > "Increase the width of FRAME (default: selected-frame) by INCREMENT. >Interactively, INCREMENT is given by the prefix argument." > (interactive "p") > (set-frame-width frame (+ (frame-width frame) increment))) > >(global-set-key [(control meta down)] (quote sk-grow-frame-height)) >(global-set-key [(control meta up)] > (lambda () (interactive) (sk-grow-frame-height -1))) >(global-set-key [(control meta right)] (quote sk-grow-frame-width)) >(global-set-key [(control meta left)] > (lambda () (interactive) (sk-grow-frame-width -1))) > >Sarir > > >
