GNU bug report logs - #52855
vc-shrink-buffer

Previous Next

Package: emacs;

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

Date: Tue, 28 Dec 2021 18:32:02 UTC

Severity: wishlist

Tags: patch

Merged with 36859, 51062

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: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 52855 <at> debbugs.gnu.org
Subject: bug#52855: vc-shrink-buffer
Date: Wed, 29 Dec 2021 10:23:08 +0200
>> When no shrink is needed, two new hooks are added in this patch
>> with the default value containing vc-shrink-buffer to preserve
>> the current behavior that can be easily removed in user configuration
>> by e.g.:
>>    (remove-hook 'vc-diff-finish-functions 'vc-shrink-buffer)
>>    (remove-hook 'vc-log-finish-functions 'vc-shrink-buffer)
>
> So the idea is to allow customizing this behavior off?
>
> For those users who don't see the benefits?

What for one is a benefit, for others is an annoyance.

> LGTM.

Before pushing I only have a doubt about 'vc-shrink-buffer'.
Currently it's a wrapper around 'shrink-window-if-larger-than-buffer'
that has nothing to do with vc:

  (defun vc-shrink-buffer (&optional buffer)
    "Call `shrink-window-if-larger-than-buffer' only when BUFFER is visible.
  BUFFER defaults to the current buffer."
    (let ((window (get-buffer-window buffer t)))
      (when window
        (shrink-window-if-larger-than-buffer window))))

Maybe it should be in window.el and renamed to

  shrink-buffer-if-larger-than-buffer




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.