all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 52855@debbugs.gnu.org
Subject: bug#52855: vc-shrink-buffer
Date: Wed, 29 Dec 2021 10:23:08 +0200	[thread overview]
Message-ID: <86tuer3jhb.fsf@mail.linkov.net> (raw)
In-Reply-To: <d49e123e-f1fd-5f08-e143-7a07ee2cb794@yandex.ru> (Dmitry Gutov's message of "Wed, 29 Dec 2021 01:53:26 +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





  reply	other threads:[~2021-12-29  8:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-28 18:29 bug#52855: vc-shrink-buffer Juri Linkov
2021-12-28 23:53 ` Dmitry Gutov
2021-12-29  8:23   ` Juri Linkov [this message]
2021-12-29 15:45     ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86tuer3jhb.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=52855@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.