unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Matthias <cimosque@free.fr>
Subject: split-window documentation
Date: 11 Jul 2004 11:26:52 +0200	[thread overview]
Message-ID: <yg7iscuvqqr.fsf@fermat.math.uvsq.fr> (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

             reply	other threads:[~2004-07-11  9:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-11  9:26 Matthias [this message]
2004-07-12  7:23 ` split-window documentation David Vanderschel
2004-07-12  8:34   ` Matthias
2004-07-12 20:41     ` Kevin Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yg7iscuvqqr.fsf@fermat.math.uvsq.fr \
    --to=cimosque@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).