From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#36859: Customizable fit-window-to-buffer Date: Thu, 08 Aug 2019 01:01:10 +0300 Organization: LINKOV.NET Message-ID: <87o910my8p.fsf@mail.linkov.net> References: <87sgqnp9z8.fsf@mail.linkov.net> <6a42d2af-b17a-d2da-1c3c-655f3f2a356f@gmx.at> <87sgqmq67t.fsf@mail.linkov.net> <1d94d43d-45d8-c917-426f-f3ba8c0feabf@gmx.at> <87wofuue1e.fsf@mail.linkov.net> <87ef20wzuw.fsf@mail.linkov.net> <1779fe6f-3196-a6f9-99af-4344008be1ae@gmx.at> <878ss7tgmh.fsf@mail.linkov.net> <1b0ee8ff-2fbb-ad3e-3554-fd73399af4eb@gmx.at> <87r25yq6se.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="226449"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 36859@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 08 00:04:24 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hvU2f-000wlq-LY for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Aug 2019 00:04:22 +0200 Original-Received: from localhost ([::1]:45528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvU2e-0001sc-Nb for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Aug 2019 18:04:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46698) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvU2O-0001eg-68 for bug-gnu-emacs@gnu.org; Wed, 07 Aug 2019 18:04:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvU2N-0008Ny-3c for bug-gnu-emacs@gnu.org; Wed, 07 Aug 2019 18:04:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59012) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvU2N-0008No-0N for bug-gnu-emacs@gnu.org; Wed, 07 Aug 2019 18:04:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hvU2M-0003wE-RW for bug-gnu-emacs@gnu.org; Wed, 07 Aug 2019 18:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Aug 2019 22:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36859 X-GNU-PR-Package: emacs Original-Received: via spool by 36859-submit@debbugs.gnu.org id=B36859.156521538815042 (code B ref 36859); Wed, 07 Aug 2019 22:04:02 +0000 Original-Received: (at 36859) by debbugs.gnu.org; 7 Aug 2019 22:03:08 +0000 Original-Received: from localhost ([127.0.0.1]:39598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvU1T-0003uY-Ns for submit@debbugs.gnu.org; Wed, 07 Aug 2019 18:03:07 -0400 Original-Received: from bird.elm.relay.mailchannels.net ([23.83.212.17]:43384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvU1R-0003u4-8N for 36859@debbugs.gnu.org; Wed, 07 Aug 2019 18:03:05 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 513472C25AC; Wed, 7 Aug 2019 22:03:04 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a93.g.dreamhost.com (100-96-91-66.trex.outbound.svc.cluster.local [100.96.91.66]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id E18632C0D06; Wed, 7 Aug 2019 22:03:03 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a93.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.5); Wed, 07 Aug 2019 22:03:04 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Hysterical-Squirrel: 4447ddbd234ecb57_1565215384149_1594310338 X-MC-Loop-Signature: 1565215384149:1658566082 X-MC-Ingress-Time: 1565215384148 Original-Received: from pdx1-sub0-mail-a93.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a93.g.dreamhost.com (Postfix) with ESMTP id B01E38115B; Wed, 7 Aug 2019 15:03:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=cr0jj0fL0fuVzaA7PJOTK8xBpc8=; b= u9lSKswD4q5dswWbHsW1tDTXlQ3YEzhDEEq8oJV8+36PoPNnpwez+COp9MJn4f10 p1UmokJ+MgKQRhmVzbpgaA7tCpXGdq68aTXKNd71Ofzy4aSxcaEC9q+6fgEhYo1Z afaMlomNj16Mgs9i+GXisZw6wLQW7l3DPyOqUUbu/Vg= Original-Received: from mail.jurta.org (m91-129-103-91.cust.tele2.ee [91.129.103.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a93.g.dreamhost.com (Postfix) with ESMTPSA id 234E481155; Wed, 7 Aug 2019 15:02:59 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a93 In-Reply-To: <87r25yq6se.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 07 Aug 2019 01:16:01 +0300") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddruddufedgtdejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrdeludenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrdeluddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164737 Archived-At: >> The only practicable solution IMHO is to provide a plain >> 'vc-adjust-window-size-function' option defaulting to >> 'shrink-window-if-larger-than-buffer' and allowing 'ignore' and >> 'fit-window-to-buffer' as alternatives. > > This looks like hooks. I too like hooks, I don't understand > why vc uses such inconvenient macros as vc-run-delayed > instead of more flexible hooks. Window management could use > hooks more often, e.g. to delay setting window-start/window-point > to later times when the buffer is ready, etc. I see there is a hook already in vc: 'vc-post-command-functions'. But it's unclear how to use it to call 'shrink-window-if-larger-than-buffer' from the hook only on vc-log and vc-diff commands. Maybe vc-log-internal-common and vc-diff-internal could provide new hooks, e.g. vc-log-post-command-functions and vc-diff-post-command-functions.