[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: set window width
From: |
Drew Adams |
Subject: |
RE: set window width |
Date: |
Wed, 8 Dec 2010 15:44:46 -0800 |
> > I've been searching for some M-x set-window-width function
> > but I can't find anything. The closer solution I've found is
> > M-x set-variable window-min-width 80
> > and then drag the fringe with the mouse. That's suboptimal imho. Any
> > better ideas?
>
> I wrote this pair of functions to do this recently.
>
> (defun set-frame-width-interactive (width)
> "Set the width of the curent frame."
> (interactive "NNew width: ")
> (let ((old-width (frame-width)))
> (set-frame-width nil width)
> (message "Old width was %d" old-width)))
>
> (defun set-frame-height-interactive (height)
> "Set the height of the curent frame."
> (interactive "NNew height: ")
> (let ((old-height (frame-height)))
> (set-frame-height nil height)
> (message "Old height was %d" old-height)))
1. You might want to propose that `set-frame-width' and `set-frame-height' be
changed to commands (essentially what is shown above). To do that, use `M-x
report-emacs-bug' (enhancements are filed the same way as bugs).
2. If you also want to resize incrementally using the keyboard:
http://www.emacswiki.org/emacs/FrameModes#frame-cmds.el