[Top][All Lists]

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

split-window documentation

From: Matthias
Subject: split-window documentation
Date: 11 Jul 2004 11:26:52 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2


I have written a function to setup a window configuration I find
useful. But when working in a terminal with a small text height, the
function `split-window' may return the following error:

 Window height 3 too small (after splitting)

This feature is not documented in the elisp manual nor the doc spec of
`split-window'. May one give me some information so that I can add
some test in my function?

Here is the function (any comment welcome):

(defun alt-setup-configuration ()
  (if (window-configuration-p (car (get-register ?1)))
      (jump-to-register ?1)
    (when (not (one-window-p t))
      (delete-other-windows (get-largest-window)))
    (let ((window1 (selected-window))
          (window2 (split-window nil 28))
          (window3 (split-window nil 34 t)))
        (when (not (gnus-alive-p))
        (list-buffers t))
      (set-window-buffer window1 "*Group*")
      (set-window-buffer window2 "*Buffer List*")
      (set-window-point window2 (point-min))
      (set-window-buffer window3 "*Fancy Diary Entries*")
      (window-configuration-to-register ?1))))

Thank you for your help,

reply via email to

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