From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70213: Info-mode side window fit-window-to-buffer issue Date: Sat, 06 Apr 2024 10:19:20 -0700 Message-ID: <877chaqtd4.fsf@breatheoutbreathe.in> References: <875xww2ncc.fsf@breatheoutbreathe.in> <86h6gg56vg.fsf@gnu.org> <871q7j3l4b.fsf@breatheoutbreathe.in> <87jzlbddt3.fsf@gmx.net> <87msq71n2a.fsf@breatheoutbreathe.in> <87sezzfo22.fsf@gmx.net> <87sezzs20t.fsf@breatheoutbreathe.in> <87y19qaff3.fsf@gmx.net> Reply-To: Joseph Turner Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17225"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70213@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 06 19:45:21 2024 Return-path: Envelope-to: geb-bug-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 1rtA6T-0004E7-CL for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Apr 2024 19:45:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtA66-0002u3-7i; Sat, 06 Apr 2024 13:44:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtA64-0002sf-8b for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 13:44:56 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtA64-0002NA-0G for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 13:44:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtA69-0003mt-Sa for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 13:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Apr 2024 17:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70213 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 70213-submit@debbugs.gnu.org id=B70213.171242545414404 (code B ref 70213); Sat, 06 Apr 2024 17:45:01 +0000 Original-Received: (at 70213) by debbugs.gnu.org; 6 Apr 2024 17:44:14 +0000 Original-Received: from localhost ([127.0.0.1]:40927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtA5N-0003kE-Ms for submit@debbugs.gnu.org; Sat, 06 Apr 2024 13:44:14 -0400 Original-Received: from out-186.mta0.migadu.com ([2001:41d0:1004:224b::ba]:23473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtA5J-0003im-H5 for 70213@debbugs.gnu.org; Sat, 06 Apr 2024 13:44:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1712425435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ivjeP+MjN1zvw8kEnX9zs0HevRy5+um8TsJaVWNmHi4=; b=Oc1AJ/xZnrpCzdwMw/5ex9mv5Kw8kMLzqdvBuQWeC8JE6sNRHW2UQHZqRZrWS9m3krc/oJ JMvrdbT+ViYhwQV6rpMblSfasW2YJ7mueYQSFt6HuYDx2CQGRccN9STsbnLjacp3Cx1Dwq hD2BDXh8lH53pAlMujKpJOL1ydxcaaM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <87y19qaff3.fsf@gmx.net> X-Migadu-Flow: FLOW_OUT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282814 Archived-At: Stephen Berman writes: > On Fri, 05 Apr 2024 18:34:11 -0700 Joseph Turner wrote: > >> Stephen Berman writes: >> >>> On Fri, 05 Apr 2024 14:58:27 -0700 Joseph Turner >>> wrote: >>> >>>> Stephen Berman writes: >>>>> FWIW, I get the expected result with your recipe on master (GNU/Linux, >>>>> Gtk3; I don't have emacs-29 at hand to test). >>>> >>>> According to the issue that Juri linked to (bug#68081), this issue was >>>> resolved on master. >>> >>> Yes, I saw Juri's post after I sent mine; I had missed that bug report. >>> >>>> Was your Emacs build since January 6 (since >>>> d3a4fe5694f7bd1a09546d67d2cddc0f444d41ca )? >>> >>> Yep, I'm currently at >>> 09f381d70d8..: Michael Albinus 2024-03-31 Fix wildcard signals in dbusbind.c >> >> The attached patch fixes this issue, but more would need to be done for >> fit-window-to-buffer to be a meaningful value in display-buffer-alist, >> since navigating between info nodes doesn't cause the window to resize. > > I'm confused: by "I get the expected result with your recipe on master" > I meant the Info buffer appears in the window on the right after one > `C-h i', and I confirmed that my build contains the January 6 fix. Are > you saying that does not work for you and you need the patch you posted > instead? (I haven't tried that patch.) Sorry. In my attempt to simplify the issue, I confused myself. In emacs -Q on master after Jan 6 patch, eval this: (progn (setq fit-window-to-buffer-horizontally t) (setq display-buffer-alist '(((derived-mode . Info-mode) display-buffer-in-side-window (side . right) (window-width . fit-window-to-buffer)) ((derived-mode . messages-buffer-mode) display-buffer-in-side-window (side . right) (window-width . fit-window-to-buffer))))) First, to show the expected behavior with *Messages* buffer: Press C-h e to open the *Messages* buffer. It appears in a side window on the right fit to the width of the buffer content. Second, to show the unexpected behavior with *info* buffer: Ensure no side window state is lying around: (dolist (buf (list "*Messages*" "*info*")) (when (get-buffer buf) (kill-buffer buf))) Press C-h i to open the *info* buffer. It appears in a side window on the right with `window-min-width' (default 10), but the content of the *info* buffer is much wider than its window. Press C-h i again for the *info* buffer to resize itself. I would expect the *info* window to fit to the buffer contents when it first appears. The patch I sent earlier fixes this. Thanks, Joseph