Nicholas Riley
njril****@uiuc*****
Thu Oct 26 17:43:40 JST 2006
On Mon, Oct 23, 2006 at 02:17:08PM -0700, Kasper Daniel Hansen wrote: > Hi > > I am a happy user of Carbon Emacs running on my 12 inch powerbook. I > often use my powerbook with a large external screen and for that > reason I find myself switching font size and window size. It would be > incredible convenient if I could have something (shell script, apple > script etc) so I could quick and easy switch between two setups I use the following function: (defun set-frame-dimensions (frame width height) (interactive (let ((frame (selected-frame))) (list frame (read-number "Frame width: " (frame-width frame)) (read-number "Frame height: " (frame-height frame))))) (set-frame-width frame width) (set-frame-height frame height)) and I bind it to C-x 5 s as follows: (global-set-key "\C-x5s" 'set-frame-dimensions) It's pretty convenient because it lets you just set the width or height or both, just from the keyboard. To reposition a frame, you can use something like: (set-frame-position (selected-frame) 3 26) I use this to get around the default centered-on-screen behavior and put the Emacs window in the top left of the screen instead, as I prefer. -- Nicholas Riley <njril****@uiuc*****> | <http://www.uiuc.edu/ph/www/njriley>