all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: window-size constraints
Date: Sun, 15 Jun 2008 10:37:50 +0200	[thread overview]
Message-ID: <4854D4DE.3090106@gmx.at> (raw)
In-Reply-To: <jwvd4mj8nua.fsf-monnier+emacs@gnu.org>

 >>We'd still have to decide whether and how to honor buffer-local values
 >>of variables like `window-min-height'
 >
 > Of course, we have to honor it.  It's already defined as buffer-local.

In what sense is it defined as buffer-local?

 > It should be easy/trivial to support.  At least window-area-factor was
 > trivial and I see no reason why window-min-height should be any
 > more difficult.

But `window-area-factor' is not customizable.  In window_min_size_2 I
currently use Fbuffer_local_value as

	  int min_size = (BUFFERP (w->buffer)
			  ? XINT (Fbuffer_local_value (Qwindow_min_height,
						       w->buffer))
			  : window_min_height);

Is that TRT?

 >>or `split-height-threshold'.
 >
 > I'm not sure I'd want to include display-buffer in this system, tho
 > I guess it might make sense.

We could rule out splitting all windows showing a particular buffer by
setting `split-height-threshold' and `split-width-threshold' nil for
that buffer.  Isn't that something we want in another context?

 >>When the window configuration changes Emacs often tries to preserve
 >>proportionally the size of non-fixed size windows as faithfully as
 >>possible.  How would `balance-windows-area' help here?
 >
 > I'm not referring to the functionality it provides, but to the way it
 > does it, i.e. to its code.  But it's really not that important: just let
 > the C code do its thing, hoping it won't mess up majorly (i.e. it won't
 > delete windows that don't absolutely need to be deleted), and then do
 > the actual size-choice in Elisp by trying to resolve the CSP.

Resolving size constraints is harder than balancing windows.  Moreover
it should be history sensitive: For example, when a window gets deleted
it's entire size should be usually given to its previous sibling.  At
least this would hold for `with-output-to-temp-buffer' windows.





  reply	other threads:[~2008-06-15  8:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13 22:04 bug#410: 23.0.60; display-buffer regression Stephen Berman
2008-06-14  9:40 ` martin rudalics
2008-06-14 15:31   ` window-size constraints (was: bug#410: 23.0.60; display-buffer regression) Stefan Monnier
2008-06-14 22:06     ` window-size constraints martin rudalics
2008-06-15  2:01       ` Stefan Monnier
2008-06-15  8:37         ` martin rudalics [this message]
2008-06-14 22:34   ` bug#410: 23.0.60; display-buffer regression Stephen Berman

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

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

  git send-email \
    --in-reply-to=4854D4DE.3090106@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
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.