From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Popping up a buffer of certain width without making current windows too narrow Date: Tue, 26 Jul 2022 18:09:47 +0200 Message-ID: <874jz3j0so.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32636"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.6; emacs 29.0.50 To: gnu-emacs-help@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 26 19:22:26 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oGOGI-0008IK-8W for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 26 Jul 2022 19:22:26 +0200 Original-Received: from localhost ([::1]:55714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGOGH-0007Gf-6o for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 26 Jul 2022 13:22:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGNQM-0003BS-Cp for help-gnu-emacs@gnu.org; Tue, 26 Jul 2022 12:28:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGNQK-0000IH-Kv for help-gnu-emacs@gnu.org; Tue, 26 Jul 2022 12:28:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=KjOwsbrTad4D+aqYpeDjUu+Ov+zKMvQ2Q9WPg34TcYQ=; b=V0p7TvN0O0LQ0L OXFZpBYpE+Sc7nXll1Xg7bUFBdjWycEo1GsZESGLCBEkKwh55zXqi4tZcpCNelYOzKaWQ2y9lWrNt 1jcYpTXTj+VUI3zoswVMuDYxu7muZoTeHESczlMS8nBg+y6G9N/kYOsyp2dUoEo9PBS89WRben/bO 9xnfP3sb8I+PiW9VbUTbASKbUcyTDns+TkY8rvnGA7J1i9p16fOqXF16l0fE7ftpV3EHJLJqMvkVZ zCrDnKwzlcjTj6VC0xKoECmsPar/cE1i6Wa8bseEbTKRwSExfNjbNTCi/LLNBlCyKesX0Llnd0dwK t//D/Aa4mWWqiFrq7LeQ==; Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:35811) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGNQJ-0003Fe-9z for gnu-emacs-help@gnu.org; Tue, 26 Jul 2022 12:28:44 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id D54A927C0054 for ; Tue, 26 Jul 2022 12:28:42 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 26 Jul 2022 12:28:42 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddutddguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfgfhvffufffkgggtsehttdertd dtredtnecuhfhrohhmpefvrghsshhilhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhr gheqnecuggftrfgrthhtvghrnhepuddvueevjeefkeeuffeifffhtefhvdeiuddttdfgie dvvdfhvefflefgudejteevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthi dqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeepghhnuhdrohhrghesfhgrshht mhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 26 Jul 2022 12:28:42 -0400 (EDT) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138626 Archived-At: Hi all, I have a situation where I generate a buffer and measure its contents' width (it's a diff output which might be a side-by-side diff, so can be probably around 160 columns wide), and then I want to display it. I use (pop-to-buffer (current-buffer) `(nil (window-width. ,width))) so that the the resulting window is wide enough to fit the buffer's contents. That basically works except it can easily result in an existing window being split and the buffer of the split window now being much to narrow. So what I'd actually would like to have is a way to say: 1. Please show this buffer (no matter how, e.g., existing window or new window) and ensure the window that will show it is wide enough... 2. ... while at the same time ensure that no existing window becomes resized narrower than, say, 70 columns. Point 1 is solved but I have no idea about point 2. I've tried setting window-min-width to 70 but that didn't seem to have an effect. As a workaround I'm currently using `display-buffer-at-bottom` as ACTION entry which has the downside of creating a bottom window where a side-by-side split would also do. Bye, Tassilo