all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 20189@debbugs.gnu.org
Subject: bug#20189: 25.0.50; Feature request: Alternative split-window-sensibly functions
Date: Thu, 26 Mar 2015 05:27:43 +0100	[thread overview]
Message-ID: <87oange62o.fsf@gnu.org> (raw)
In-Reply-To: <83lhikoojd.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Mar 2015 21:38:46 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> But for the time being, I prefer some solution which is available
>> right now and good enough for my personal preferences.  And that's
>> the point of the issue.  Window handling is extremely hard to
>> configure in Emacs with the amounts of options we have.  That's why
>> I've suggested to have a small set of alternatives one can choose
>> from without having to dig into the details of window thresholds,
>> window parameters, window combinations, etc.
>
> So how about adding 2 more parameters that we've discussed a few
> messages ago, and then come up with a logic that uses all 4 of them to
> give more "sensible" results?

With the new parameters you mean something like `window-preferred-width'
and `window-preferred-height', right?

Sounds legit to me.  In my case, I'd set the preferred width to 80 but
my preferred height is usually as high as possible or as high as needed
to fit the contents of the buffer we want to show in that new window.

Maybe it would make sense to use the values of these two variables (if
non-nil) as defaults for the `window-width' and `window-height' alist
entries of `display-buffer'.

I'm still a bit unsure how to differentiate "preferred width" from
`window-min-width'.  For me, preferred width means a lower bound for
windows with "normal" buffers.  So maybe I want to set
`window-min-width' to 80 instead of its default of 10?  But what about
special, narrow buffers such as `sr-speedbar' (speedbar shown in a
narrow window instead of an extra frame)?

To answer myself: it seems I actually want to use a minimum width of
80.  That seems to supress any splits that result in windows smaller
than 80 columns unless the width is explicitly given, e.g.,

  (setq window-min-width 80)
  (display-buffer (get-buffer "*Help*")
                  '(display-buffer-pop-up-window
                    (window-width . 10)))

still splits although the new window is just 10 columns wide.

Bye,
Tassilo





  reply	other threads:[~2015-03-26  4:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24  9:18 bug#20189: 25.0.50; Feature request: Alternative split-window-sensibly functions Tassilo Horn
2015-03-24 10:51 ` martin rudalics
2015-03-24 11:39   ` Tassilo Horn
2015-03-24 13:30     ` martin rudalics
2015-03-24 14:59       ` Tassilo Horn
2015-03-25  8:23         ` martin rudalics
2015-03-25  9:41           ` Tassilo Horn
2015-03-26 10:58             ` martin rudalics
2015-03-26 11:01             ` Tassilo Horn
2015-03-26 13:47               ` martin rudalics
2015-03-26 14:18                 ` Stefan Monnier
2015-03-26 14:31                   ` martin rudalics
2015-03-27 18:26                     ` Stefan Monnier
2015-03-26 15:15                 ` Tassilo Horn
2015-03-26 16:04                   ` martin rudalics
2015-03-24 17:05 ` Eli Zaretskii
2015-03-25  7:00   ` Tassilo Horn
2015-03-25  8:24     ` martin rudalics
2015-03-25 17:25     ` Eli Zaretskii
2015-03-25 19:33       ` Tassilo Horn
2015-03-25 19:38         ` Eli Zaretskii
2015-03-26  4:27           ` Tassilo Horn [this message]
2015-03-26 10:58             ` martin rudalics
2015-03-26 16:29             ` Eli Zaretskii
2015-03-25  8:23   ` martin rudalics

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=87oange62o.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=20189@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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.