all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

* Re: split-window documentation
  2004-07-11  9:26 split-window documentation Matthias
@ 2004-07-12  7:23 ` David Vanderschel
  2004-07-12  8:34   ` Matthias
  0 siblings, 1 reply; 4+ messages in thread
From: David Vanderschel @ 2004-07-12  7:23 UTC (permalink / raw)


"Matthias" <cimosque@free.fr> wrote in message
news:yg7iscuvqqr.fsf@fermat.math.uvsq.fr...
> 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?

It is hardly surprising that there should be such a
limit.  Since you now know emacs' low limit on window
height and how the split-window function behaves, I
should think that you could avoid the error by
checking your situation using function window-height.

Regards,
  David V.

PS - Interestingly, by adjusting the size of my frame,
I can persuade emacs to display a window in a single
line.  It gives up the echo/minibuffer line first,
then the mode line - but it still works!

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

* Re: split-window documentation
  2004-07-12  7:23 ` David Vanderschel
@ 2004-07-12  8:34   ` Matthias
  2004-07-12 20:41     ` Kevin Rodgers
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias @ 2004-07-12  8:34 UTC (permalink / raw)


"David Vanderschel" <DJV4@Austin.RR.com> wrote:

> (...) Since you now know emacs' low limit on window height

No, I don't know. This is exactly what I am asking for! Is there a
variable which fix this limit?
-- 
Matthias

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

* Re: split-window documentation
  2004-07-12  8:34   ` Matthias
@ 2004-07-12 20:41     ` Kevin Rodgers
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2004-07-12 20:41 UTC (permalink / raw)


Matthias wrote:
 > "David Vanderschel" <DJV4@Austin.RR.com> wrote:
 >>(...) Since you now know emacs' low limit on window height
 >
 > No, I don't know. This is exactly what I am asking for! Is there a
 > variable which fix this limit?

window-min-height

-- 
Kevin Rodgers

^ 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.