unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* split-window documentation
@ 2004-07-11  9:26 Matthias
  2004-07-12  7:23 ` David Vanderschel
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias @ 2004-07-11  9:26 UTC (permalink / raw)


Hi,

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 ()
  (interactive)
  (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)))
      (save-excursion
        (diary)
        (when (not (gnus-alive-p))
          (gnus))
        (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,
-- 
Matthias

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-07-12 20:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-11  9:26 split-window documentation Matthias
2004-07-12  7:23 ` David Vanderschel
2004-07-12  8:34   ` Matthias
2004-07-12 20:41     ` Kevin Rodgers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).