From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#20189: 25.0.50; Feature request: Alternative split-window-sensibly functions Date: Thu, 26 Mar 2015 05:27:43 +0100 Message-ID: <87oange62o.fsf@gnu.org> References: <87iodqbvoz.fsf@gnu.org> <83384uqqao.fsf@gnu.org> <871tkd36jx.fsf@gnu.org> <83egodouoo.fsf@gnu.org> <87a8z027or.fsf_-_@gnu.org> <83lhikoojd.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1427344107 30627 80.91.229.3 (26 Mar 2015 04:28:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Mar 2015 04:28:27 +0000 (UTC) Cc: 20189@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 26 05:28:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YazOv-0007o8-PG for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Mar 2015 05:28:13 +0100 Original-Received: from localhost ([::1]:42634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YazOv-0005cz-0x for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Mar 2015 00:28:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YazOp-0005cj-QO for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2015 00:28:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YazOk-0005k3-Lb for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2015 00:28:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YazOk-0005jz-HI for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2015 00:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YazOk-0003km-41 for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2015 00:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Mar 2015 04:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20189 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20189-submit@debbugs.gnu.org id=B20189.142734407114400 (code B ref 20189); Thu, 26 Mar 2015 04:28:02 +0000 Original-Received: (at 20189) by debbugs.gnu.org; 26 Mar 2015 04:27:51 +0000 Original-Received: from localhost ([127.0.0.1]:36892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YazOY-0003kC-8g for submit@debbugs.gnu.org; Thu, 26 Mar 2015 00:27:50 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:59225) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YazOV-0003jz-TS for 20189@debbugs.gnu.org; Thu, 26 Mar 2015 00:27:48 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9A8AA20977 for <20189@debbugs.gnu.org>; Thu, 26 Mar 2015 00:27:44 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Thu, 26 Mar 2015 00:27:47 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:cc:subject:references :date:in-reply-to:message-id:mime-version:content-type; s= smtpout; bh=NRseQ41ST9Cd0ybHEg+I2learT8=; b=VT57vVlqn+sZ8s3lALoH Gk84uZWiDVDpQ+tiP5xL2tniXFVGBRXmo+g4ArpBqlwCPQW5R6vCFTd03mFG+9jx aIcVvJDoyldxAP5Znv+Shtx20uMUtJ9sx3MiHvATvtT9sfNy0Lu0pVl7sRoedkZ5 mUApjjYFMsuqKNiqPfm07as= X-Sasl-enc: XOddbsUlEZpM1RvaWtSf/lAcYFWrg4asX23ilYL0PY5H 1427344066 Original-Received: from thinkpad-t440p (unknown [2.161.101.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 5C874680105; Thu, 26 Mar 2015 00:27:46 -0400 (EDT) In-Reply-To: <83lhikoojd.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Mar 2015 21:38:46 +0200") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:100941 Archived-At: Eli Zaretskii 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