help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set window width


From: Harald Hanche-Olsen
Subject: Re: set window width
Date: Wed, 08 Dec 2010 15:13:15 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (darwin)

+ Dimitrios Apostolou <jimis@gmx.net>:

> 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)))

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell


reply via email to

[Prev in Thread] Current Thread [Next in Thread]