GNU bug report logs - #51062
Customizable window resizing

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Wed, 6 Oct 2021 17:36:01 UTC

Severity: wishlist

Tags: patch

Merged with 36859, 52855

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Juri Linkov <juri <at> linkov.net>, 51062 <at> debbugs.gnu.org
Subject: bug#51062: Customizable window resizing
Date: Thu, 7 Oct 2021 11:08:37 +0200
> There are two ways how window resizing is currently hard-coded:
>
> 1. As discussed in
>     https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg01627.html
>     when temp-buffer-resize-mode is enabled, it's impossible
>     to disable automatic window resizing of the Help buffer.
>
>     Thanks to Martin, the patch in
>     https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg01873.html
>     allows customization when display-buffer-alist contains
>     (window-height . nil)

That patch should help wherever 'temp-buffer-resize-mode' applies, not
just in a Help buffer.

> 2. As discussed in bug#45688, such commands as vc-log

Which command is 'vc-log'?

>     , vc-diff
>     automatically resize the window, and the problem is that currently
>     shrink-window-if-larger-than-buffer is used in these commands by default,
>     but this behavior is hard-coded and can't be disabled by customization.
>     A solution is to create a new hook like 'after-display-buffer-function'
>     that by default will contain 'shrink-window-if-larger-than-buffer'.

Wherever we currently use an idiom like

(pop-to-buffer (current-buffer))
(goto-char (point-min))
(shrink-window-if-larger-than-buffer)

we should use

(pop-to-buffer
 (current-buffer)
 '(nil (window-height . shrink-window-if-larger-than-buffer)))
(goto-char (point-min))

instead.  But if 'display-buffer' is not involved, there isn't much we
can do.  Maybe something like 'display-buffer-same-window' _after_
putting the buffer into the selected window, but this might not be 100%
compatible.  Certainly not for Emacs 28.

martin






This bug report was last modified 3 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.