From unknown Fri Jun 20 07:15:22 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#36859 <36859@debbugs.gnu.org> To: bug#36859 <36859@debbugs.gnu.org> Subject: Status: Customizable fit-window-to-buffer Reply-To: bug#36859 <36859@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:15:22 +0000 retitle 36859 Customizable fit-window-to-buffer reassign 36859 emacs submitter 36859 Juri Linkov severity 36859 wishlist tag 36859 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 30 16:39:17 2019 Received: (at submit) by debbugs.gnu.org; 30 Jul 2019 20:39:17 +0000 Received: from localhost ([127.0.0.1]:51266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsYtx-0002ds-Ds for submit@debbugs.gnu.org; Tue, 30 Jul 2019 16:39:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:57053) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsYtt-0002db-0O for submit@debbugs.gnu.org; Tue, 30 Jul 2019 16:39:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46491) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsYts-0005yG-3I for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2019 16:39:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsYtr-0001x5-2L for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2019 16:39:12 -0400 Received: from blue.oak.relay.mailchannels.net ([23.83.215.20]:59326) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hsYto-0001sx-UI for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2019 16:39:09 -0400 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 278B3501A57 for ; Tue, 30 Jul 2019 20:39:07 +0000 (UTC) Received: from pdx1-sub0-mail-a24.g.dreamhost.com (100-96-15-31.trex.outbound.svc.cluster.local [100.96.15.31]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B5F485020C9 for ; Tue, 30 Jul 2019 20:38:23 +0000 (UTC) Received: from pdx1-sub0-mail-a24.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); Tue, 30 Jul 2019 20:39:07 +0000 Received: from pdx1-sub0-mail-a24.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a24.g.dreamhost.com (Postfix) with ESMTP id D80C283EDE for ; Tue, 30 Jul 2019 13:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=linkov.net; bh=0cvgyfOkcsc+gDCvzt1 Yc07ArlQ=; b=mFvLG3fSqR6rB7JD3xV4cKCPgJU/ayyTsw12pbPQmToKxUlFFjN dB1kFFZnfsmGd2QyJEVo43WJVaRS4j02EGc/FV729dEced34PcyZ7c1jf+SEk/p1 m9Eun/AhvRoaTJI5q+OZyNXja8tSWGpdo76VnS+to75wJPxiDTt5AAmg= Received: from mail.jurta.org (m91-129-103-76.cust.tele2.ee [91.129.103.76]) (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-a24.g.dreamhost.com (Postfix) with ESMTPSA id AFA6383ECF for ; Tue, 30 Jul 2019 13:37:55 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a24 From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: Customizable fit-window-to-buffer Organization: LINKOV.NET Date: Tue, 30 Jul 2019 23:23:03 +0300 Message-ID: <87sgqnp9z8.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrleefgddugeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffuohffkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrdejieenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrdejiedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 23.83.215.20 X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) It's a nice feature when fit-window-to-buffer resizes temporary windows that go away after exiting the minibuffer. OTOH, resizing permanent windows does more harm, because these windows can be reused later for other buffers, but their size remains too narrow. I'm not asking to change the default behavior, but it should be customiza= ble. Current examples of such behavior include: - =E2=80=98C-h f=E2=80=99 (describe-function) diminishes the bottom verti= cally-split Help window; - =E2=80=98C-x v l=E2=80=99 (vc-print-log) diminishes the log window if i= t contains a few entries; - =E2=80=98C-x v =3D=E2=80=99 (vc-diff) diminishes the height of the diff= window; ... From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 31 05:12:59 2019 Received: (at 36859) by debbugs.gnu.org; 31 Jul 2019 09:12:59 +0000 Received: from localhost ([127.0.0.1]:51540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hskfL-0003e5-EE for submit@debbugs.gnu.org; Wed, 31 Jul 2019 05:12:59 -0400 Received: from mout.gmx.net ([212.227.15.18]:46001) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hskfH-0003dp-GO for 36859@debbugs.gnu.org; Wed, 31 Jul 2019 05:12:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1564564367; bh=Ga8ulQ2JyE50paW3E1yWxPf/o52TuG47ZorqIQOIhIE=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=L+F3mxpNBdwisTGpbrzJ012rJ7gks9+Ue8Y4wTlE4FUS48nmQOLxb4s/UOP8teXLx zJx6jCT7uzzdqILo4gQJyveYNI7mdO8iG2mv4VDgOqBT/Iaw5QuW926PX+I5cT9reL nvokclj/EZKg1xEIUOywu1tMJ6u6KcQdwrWaerzA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([213.162.73.223]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MU11l-1hjdsN3ZSb-00Qgsa; Wed, 31 Jul 2019 11:12:46 +0200 Subject: Re: bug#36859: Customizable fit-window-to-buffer To: Juri Linkov , 36859@debbugs.gnu.org References: <87sgqnp9z8.fsf@mail.linkov.net> From: martin rudalics Message-ID: <6a42d2af-b17a-d2da-1c3c-655f3f2a356f@gmx.at> Date: Wed, 31 Jul 2019 11:12:46 +0200 MIME-Version: 1.0 In-Reply-To: <87sgqnp9z8.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:ec/VENoAcnw5zyr3uEkxl87cCIqHnWlxwxy3wNP4DuQiRbh7Fp/ 2FxCHadyqEXBUbkCeBkNxwK6HLr9viodMSfXcQ3EqaItb+t054m6iTIKFQvyBEZolEeNo5r BcoZWwZR3dgagCocwxZ5FqhRchg5MqojvdTuVYUJVMtEsmQgIWy9ipv86Drt8Xo4FhoMsHr yJB5Ak1JigOIuZ4b5r/JA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:6DsxekjXNgs=:CmMoqEADjkb0YUifFxQRPs Ky5Hzb35W4fombLlJYh48FA94OP2zeHxq45fYKvVCMvdWcw3f/92tcC2TrqyyNUhuOuoUKp1N 7QQZLjATWCmnslMsfGd+MGurdtL00FcRInoLk418Eo360hXBFVxOmtycEIOIk+VohFR+bkJEt TbtJATRSer4m2Ga+BKMu0MnNX6Fl2zh7IyOwUbeU0sXNu28DY2tL7nScYi81QbSHeEq8wayNF OLZLqero/aMShE9GMe5PkaoV9SEDYvDE/dDePMz1A78QaSKFYOvfUMZ0YIMHBuByheH0yOaHM SR/qWXpsPhc0BhXIFoEvY1O/1hK1MjHJwP0LyYm91nICOuvV5ZF/Z6+UOSmbS3Q3lSXx4A2RO cuhBdkLbw9tE5nZ2llg+xJ68D/baP22ZGe9kZEg1cTCOIm18eQuEC0fwTeLdy1EWoxU0D25Na Fif3NMIgw9kNI83MCV5WBkQlK3LRjxGYqQCuH2Us18vYc9upZEqiG4PDBLbWkngoV14eQqPcf 3Uj0kJ1zMZxXUM5KA3BYsBAa8eGdF9u+de70R8MwOFwWyGKuey+AkkZ/ZkKRi0hGuCrlRA/kY 1A7BElFnGL44A+RW3XmGLfY9/i/eW+Q3Mx73Q9zhuzHPkJImLtvUp02+MgpTuypBkVpVgvJu1 G9qHhU9/7YzJ63WWuhc+kUqNvT2u2mu/06CdaHgsf9rJptAubeDYGT4WpOMLtgJktvWrvpT5m sYLW/7XXxZqWqRlc7ZOA78BBxw6NA1GxUVRh9M6M+W28Ez5bGKIrd83ib0QEmYgCqL/GDHaUj u+kmLh8m0EBWsxY6CBXJ9IziOVS0b94+fk5sk4M7saf2gf6Ulwcmh/MdEFioAnWN6C4ooNw/S 2y/x0GKInySgp9O1LYGUyjexjGTX5wu/Exh4PgyBzCWLvff5QaAkH3oQpqs+dF1T5/Mr/DrvC maVAuk/Vtl/oPxrLVftmxPVDay4LpohzQkZeLYOlSikJz309GH38343sSvuUKAej4ceoIaglQ ahyYn3iAfdYQqoTVMpHrO/4pemr4+BZYfKZ35+boYSQv+RkBrbK5VV138HnuSTuVRbUH43FMM o+dS7s0DpWsCkA= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36859 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > It's a nice feature when fit-window-to-buffer resizes temporary windows > that go away after exiting the minibuffer. > > OTOH, resizing permanent windows does more harm, because these windows > can be reused later for other buffers, but their size remains too narrow. What is a permanent window? IIRC we only fit new windows or frames that go away when quit and carefully try to not resize other windows but the one used for splitting off the new window. Old windows are fit iff they did show the same buffer before and were created for that buffer. Such windows should, by concept, not be reused for showing another buffer. > I'm not asking to change the default behavior, but it should be customizable. In what sense? martin From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 31 17:25:07 2019 Received: (at 36859) by debbugs.gnu.org; 31 Jul 2019 21:25:07 +0000 Received: from localhost ([127.0.0.1]:53198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsw5r-0004jv-0F for submit@debbugs.gnu.org; Wed, 31 Jul 2019 17:25:07 -0400 Received: from bisque.elm.relay.mailchannels.net ([23.83.212.18]:36975) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsw5o-0004jm-Ka for 36859@debbugs.gnu.org; Wed, 31 Jul 2019 17:25:05 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8638E5E1591; Wed, 31 Jul 2019 21:25:03 +0000 (UTC) Received: from pdx1-sub0-mail-a99.g.dreamhost.com (100-96-84-65.trex.outbound.svc.cluster.local [100.96.84.65]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 155085E2F0D; Wed, 31 Jul 2019 21:25:03 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a99.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, 31 Jul 2019 21:25:03 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Tangy-Illegal: 081f3d797cacc6a8_1564608303364_981803977 X-MC-Loop-Signature: 1564608303364:1658425675 X-MC-Ingress-Time: 1564608303364 Received: from pdx1-sub0-mail-a99.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a99.g.dreamhost.com (Postfix) with ESMTP id E33128109C; Wed, 31 Jul 2019 14:24:57 -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=Sm6MRttYNSDLiKbxV6BwWGkm/ko=; b= Yms9KGgm4qYnj+Gv+xsuDGTz7a5vUYLd/QlzpdvpMxsw7NQz3aAPJYUAUFhE3hqf T8pkhzqZZnR/nn+Uqe3fwOIQAlgvUViwC2Au+gd6Th3+DkfrQIvEdOY9OlGOb/0v 51KGdzxkKHLQonn5iC15dyfLzroGKW8g72osdoPwbps= Received: from mail.jurta.org (m91-129-103-76.cust.tele2.ee [91.129.103.76]) (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-a99.g.dreamhost.com (Postfix) with ESMTPSA id EE99E810A2; Wed, 31 Jul 2019 14:24:55 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a99 From: Juri Linkov To: martin rudalics Subject: Re: bug#36859: Customizable fit-window-to-buffer Organization: LINKOV.NET References: <87sgqnp9z8.fsf@mail.linkov.net> <6a42d2af-b17a-d2da-1c3c-655f3f2a356f@gmx.at> Date: Wed, 31 Jul 2019 23:57:14 +0300 In-Reply-To: <6a42d2af-b17a-d2da-1c3c-655f3f2a356f@gmx.at> (martin rudalics's message of "Wed, 31 Jul 2019 11:12:46 +0200") Message-ID: <87sgqmq67t.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrleehgdduheelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrdejieenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrdejiedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36859 Cc: 36859@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> It's a nice feature when fit-window-to-buffer resizes temporary windows >> that go away after exiting the minibuffer. >> >> OTOH, resizing permanent windows does more harm, because these windows >> can be reused later for other buffers, but their size remains too narrow. > > What is a permanent window? A window that remains indefinitely after finishing the current command, and where other buffers with different number of lines might appear. IIRC we only fit new windows or frames > that go away when quit and carefully try to not resize other windows > but the one used for splitting off the new window. Old windows are > fit iff they did show the same buffer before and were created for that > buffer. Such windows should, by concept, not be reused for showing > another buffer. I see that the existing windows are resized with 'shrink-window-if-larger-than-buffer'. So not only 'fit-window-to-buffer' is involved. Two examples of 'shrink-window-if-larger-than-buffer': - in vc-log-internal-common; - in vc-diff-finish. >> I'm not asking to change the default behavior, but it should be customizable. > > In what sense? I hope it would be possible to specify a special action alist entry in 'display-buffer-alist' , e.g. (window-height . no-fit-window) to override (window-height . fit-window-to-buffer) This requires that more commands should use this alist in their 'display-buffer' calls instead of directly calling 'shrink-window-if-larger-than-buffer'. Do you think this is feasible? If not, then maybe these commands should provide post-display hooks such as e.g. 'proced-post-display-hook' where 'fit-window-to-buffer' is added by default, but can be removed by customization. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 03:58:03 2019 Received: (at 36859) by debbugs.gnu.org; 3 Aug 2019 07:58:03 +0000 Received: from localhost ([127.0.0.1]:58267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htovS-0008QV-Ts for submit@debbugs.gnu.org; Sat, 03 Aug 2019 03:58:03 -0400 Received: from mout.gmx.net ([212.227.17.22]:49151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htovR-0008Q0-6f for 36859@debbugs.gnu.org; Sat, 03 Aug 2019 03:58:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1564819067; bh=aXT2mSMe+yb6S2pN83IDEMpS1BLQh7TLv8zJDZWBILg=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=GG+JfC6k6b7YmCccqItPgh+l5bk0wJAKWUk990j1BlwY7lSNcaM9CRiWKSA57lsfs C81byCWayKzs6/BdaCAjmL5dfa0E+BY24P89MIvJYl957k4hiCwb5zu7vtqb+cy4fR wy/az8bz/FJzgfKLLRXz7w4ZcGV4xysI+9nEHTsE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([213.162.73.33]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MWhRH-1hru0u2w6l-00Xtt3; Sat, 03 Aug 2019 09:57:47 +0200 Subject: Re: bug#36859: Customizable fit-window-to-buffer To: Juri Linkov References: <87sgqnp9z8.fsf@mail.linkov.net> <6a42d2af-b17a-d2da-1c3c-655f3f2a356f@gmx.at> <87sgqmq67t.fsf@mail.linkov.net> From: martin rudalics Message-ID: <1d94d43d-45d8-c917-426f-f3ba8c0feabf@gmx.at> Date: Sat, 3 Aug 2019 09:57:48 +0200 MIME-Version: 1.0 In-Reply-To: <87sgqmq67t.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:n4bJ7fcsdSA3CRgl5SDhO4G/0srZSosmqUrkhuEK3JzkQOr1Suc GHKbPZOzyF6KbdLTWrJfZSUxXLp62emfEfRj+m4R8zzcxXwGthCz7PqB8+ZLirW4swSBaI6 6z4JnmlQKMfEpAaynhM+YMHv5ECtC5Px3di9RQKuN3IWtPXuwfHABzIh1mPO/mmIOgDLMvL W8v2v9J5oMUQ0JmXEGu2A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:AKz2WaRhcXI=:WKCDWLzykqWsGhY4ot3SDQ JnMQzTtus/RXryV4VN7XY5SZP9YstwwCAOfvbgINWIP1exrZDbtfwbdp+WjfmXGjJMgrIhoQB uylgIb9KlJeoatzEkLE2KVCQJvZMiMlOEJbvBACD+4Sz3aprjh6FDT51q7d76y2e77Y9XHwpB hqb7aLBnFbz9MmIWZRCRugehOJ1swh2kGbsfi4dBCDvOo8eGUrU1isXZjpGO6LxckmE/sI6z2 XKtZGw9P9SR7A9K8wWcc899VsIfgSlgr3WcEadb4S07JB+HqqUQgkXXgs/nwqtGWVp2uqvkRw ZAZOAw72K+ZFXAGHzalle4XR64MUZe7X4qE+8c5dJFOd4j0oxQ0jEyv+BQ5QmozFSyGTrUh/n 2BEEyzXqdTzzA6FbWUV+Eawf6iDKnzP1+KDGRjCOKRjJHBWphFspHbhjc6yNW2OTskXvcukc3 6QQ+gOtHjelNR0xVwGw+zHxErLllsfPvdyGDfKXTCMyM+EACvfUHc8Xo6XDefLIXREWvminra P0+n5hyKc2m0yot3Ob2NhK0nYhONgMTH0BNn1ZNGs3k4h99pLtCT6eDg+ECsoTOaR7LiCiY0m cgpUjEzaYSe8On6xO11KpGtBtyDYmZsriaTWimufqqGqq2sfeasUulTL52m3zxE2/o1slAtLC 6fCI3DH7wGbOQV9NcL+Nd4im7O8I+P46VrDNeAlCbvhsdmD4SMJuhKv24n5h4G7n6SxfPppnS CX9L3jhvHrcAd+r2691kBba/499u1D1pNvUWZ1K3qQZ0a0ZmvyZ4cCN8HnHOxB2XcETnJwqcV UUGOjvi1S7+o3yZcrnlHbnXOlw19rTvJmRtDGw9bqEyL30/J5C3ei0LJVTz838k5uaDH40yqQ wfPwb9BZ+iakFSte0u5YHkMEVC6q2a34kk/sGXvVGErWDUooGxRjGHwFijIgL6/l7Oq4ZniUx ctObTf4C99MMVi4T45jgo8Cb70kjl0GAHK4rzutxq5OuW9Tk+j8p6iSWLYpwYFUoK3R0sP5Em vnoDyKQ5GmbcBGLgOjQYakm5laW7HSBaRW226NyfzEB8+WIpLHgcS42+clEzuUiPU46QjWOTT m2kk2Nx2bnz0MhneDSROXpPa+z2h1CbBG/c3/oRjqMfvYGU2x3CWRkwUuI3yca5nLOr8FROIj iTp5I= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36859 Cc: 36859@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> What is a permanent window? > > A window that remains indefinitely after finishing the current command, > and where other buffers with different number of lines might appear. Then the "old windows" below ... > IIRC we only fit new windows or frames >> that go away when quit and carefully try to not resize other windows >> but the one used for splitting off the new window. Old windows are >> fit iff they did show the same buffer before and were created for that >> buffer. Such windows should, by concept, not be reused for showing >> another buffer. ... are such permanent windows that should not get resized by 'display-buffer'. > I see that the existing windows are resized with > 'shrink-window-if-larger-than-buffer'. So not only > 'fit-window-to-buffer' is involved. > > Two examples of 'shrink-window-if-larger-than-buffer': > - in vc-log-internal-common; This one should shrink only if the window is either new or has a 'quit-restore' parameter that passes the (and (eq (car quit-restore) 'same) (eq (nth 1 quit-restore) 'window))) test. In either case, it will ignore any user supplied 'window-height' option. > - in vc-diff-finish. This should probably do a similar thing. >>> I'm not asking to change the default behavior, but it should be customizable. >> >> In what sense? > > I hope it would be possible to specify a special action alist entry > in 'display-buffer-alist' , e.g. > > (window-height . no-fit-window) Wouldn't just (window-height) suffice? > to override > > (window-height . fit-window-to-buffer) > > This requires that more commands should use this alist in their > 'display-buffer' calls instead of directly calling > 'shrink-window-if-larger-than-buffer'. IIUC 'vc-log-internal-common' fills the buffer after popping to it so I cannot see a way to simply accommodate that. > Do you think this is feasible? If not, then maybe these commands > should provide post-display hooks such as e.g. 'proced-post-display-hook' > where 'fit-window-to-buffer' is added by default, but can be removed > by customization. We could introduce a new ALIST argument, say 'pre-display-function'. The function specified there would be called before running the body of 'window--display-buffer'. In the case at hand, that function would fill the buffer so OT1H 'shrink-window-if-larger-than-buffer' would know the real buffer size and OTOH a 'window-height' entry would allow to override that. I wouldn't know whether and how to suitably pass any arguments to such a function, though. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 17:41:42 2019 Received: (at 36859) by debbugs.gnu.org; 3 Aug 2019 21:41:42 +0000 Received: from localhost ([127.0.0.1]:60153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hu1mY-0002LK-2H for submit@debbugs.gnu.org; Sat, 03 Aug 2019 17:41:42 -0400 Received: from bonobo.elm.relay.mailchannels.net ([23.83.212.22]:26334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hu1mU-0002LA-Jj for 36859@debbugs.gnu.org; Sat, 03 Aug 2019 17:41:41 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 834F7501F94; Sat, 3 Aug 2019 21:41:37 +0000 (UTC) Received: from pdx1-sub0-mail-a75.g.dreamhost.com (100-96-11-214.trex.outbound.svc.cluster.local [100.96.11.214]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B204C501E6F; Sat, 3 Aug 2019 21:41:34 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a75.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); Sat, 03 Aug 2019 21:41:37 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Eyes-Abiding: 265a406d1ada3f1a_1564868495003_2857214656 X-MC-Loop-Signature: 1564868495003:2444503678 X-MC-Ingress-Time: 1564868495003 Received: from pdx1-sub0-mail-a75.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a75.g.dreamhost.com (Postfix) with ESMTP id 114057F0F9; Sat, 3 Aug 2019 14:41:29 -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=R2TtWeCQhu0RwftbfTltmWNkE3Q=; b= 1ECi+HErvuHn717GAVKUdpKxlygSxh/aSNqifjwhD3qmVVOa+fDsV3SOaRjRHnQy qQU7MlIJfHRzHX0X3Ws5/VKGDBmPwQsoKMDQHC7QgpFP9l9P14YHMIlhxhWf4/Uj BAUqF0I0T7DJbefqoUTMWCkFpgbL/wpSPadaIWgcWv0= Received: from mail.jurta.org (m91-129-103-76.cust.tele2.ee [91.129.103.76]) (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-a75.g.dreamhost.com (Postfix) with ESMTPSA id 49BE77FEB7; Sat, 3 Aug 2019 14:41:26 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a75 From: Juri Linkov To: martin rudalics Subject: Re: bug#36859: Customizable fit-window-to-buffer Organization: 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> Date: Sun, 04 Aug 2019 00:16:45 +0300 In-Reply-To: <1d94d43d-45d8-c917-426f-f3ba8c0feabf@gmx.at> (martin rudalics's message of "Sat, 3 Aug 2019 09:57:48 +0200") Message-ID: <87wofuue1e.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddruddtvddgvddtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrdejieenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrdejiedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36859 Cc: 36859@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> I hope it would be possible to specify a special action alist entry >> in 'display-buffer-alist' , e.g. >> >> (window-height . no-fit-window) > > Wouldn't just (window-height) suffice? Maybe, I'm not sure if the case when window-height is missing in alist can be distinguished from the case when window-height is nil. >> Do you think this is feasible? If not, then maybe these commands >> should provide post-display hooks such as e.g. 'proced-post-display-hook' >> where 'fit-window-to-buffer' is added by default, but can be removed >> by customization. > > We could introduce a new ALIST argument, say 'pre-display-function'. > The function specified there would be called before running the body > of 'window--display-buffer'. In the case at hand, that function would > fill the buffer so OT1H 'shrink-window-if-larger-than-buffer' would > know the real buffer size and OTOH a 'window-height' entry would allow > to override that. I wouldn't know whether and how to suitably pass > any arguments to such a function, though. Or maybe 'shrink-window-if-larger-than-buffer' could be added in the body of another new ALIST argument 'post-display-function'. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 04 04:00:33 2019 Received: (at 36859) by debbugs.gnu.org; 4 Aug 2019 08:00:33 +0000 Received: from localhost ([127.0.0.1]:60388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huBRR-0002qB-Gr for submit@debbugs.gnu.org; Sun, 04 Aug 2019 04:00:33 -0400 Received: from mout.gmx.net ([212.227.15.18]:39147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huBRP-0002pz-Sg for 36859@debbugs.gnu.org; Sun, 04 Aug 2019 04:00:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1564905621; bh=LRkLgGGdn1axEXSceQ7fFCQFGUv8APrOeEyRQzN04EU=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=Mc/JqIXskae5Fb7OVJv2ezWQ5HauG89eWC61fleckss36NFSWkuFal4F4pOksvN4K NbAhBrOP0lCJiMpcj6MeMSeqr38oir5zKHdoD4dO1X6yZURhtPtgLWTUTSSNMb53ok ZiI1KBOqAMjm2EeIaKG81ovccrgYqMjxq/wIlbC4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([213.142.96.135]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MMk99-1hzPIZ45Xj-008dyB; Sun, 04 Aug 2019 10:00:21 +0200 Subject: Re: bug#36859: Customizable fit-window-to-buffer To: Juri Linkov 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> From: martin rudalics Message-ID: Date: Sun, 4 Aug 2019 10:00:20 +0200 MIME-Version: 1.0 In-Reply-To: <87wofuue1e.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:tpTegh+fl8ta8N+JuaUJSoGgPetVJsRrY1q6F56OXH1dsMOnAp0 +OvSH9Z5mgfEBlYdQjTFgsg8xsjo/zJaCWUyfRD+kz7d5+Ig4irmKMAjRRkthCEHl51NDty Gq8dj1ZmWVICY9hxRiyfdJaMyvAvwN5kOEoMRiEcPKBT+sK1q2x04B0TVgtCQnOxeZ5RP4l gM5OsnOBpKWOiD9nKasSg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:XJYvqIm3YtI=:xin1fbocgb89LcCynlLnqo uk31Wa+B3X2mSjH7Q7STuDycWTF3hx4uNJi+nn/IBwQ/vtB1gE6Phg3to5YMO3A8ffhzgQWS9 /UrJPGnXEuq9F8oLsq3AOomRTt5l7m6rN7mu4nt2GiLlS1hW8DRDpy8naCoyRhKSuTn51IPXu 30ocRbmSXPRhhOIxC5CYFC7aQGXZMT95yBb8JAbdim0ZPLWh8jyERvAki8mS2W8ajB8QUfjWT YQ1yKoRnUWZqZYUGRXor00h3EjW96zH5tMiODTsOCvcSg+7CilTgvZPzHF+Wisy/SFSkE6ndf T92oBIV9mf7/pZ+dZPigphylT5UGgGxJri8SaOAwDd8EHgL3U4Ob+sRjpCivXCbMryiUd7Cvy iUPe28VVbGyZL/eabx28L5OfiaKGeVFfW+dcRH+d52wy8KXTM7ty62FKs/Ai49pV8bKzf4qWL NLZbC/G8u/2dw2yiur4VrAYGykd2AzSaalTUNFH1ZN6iLQXqrawXBG5APbJ3FSPtrcSnzYzE4 Miruq4soNmtr06POaYQkusYLzl7ngakpQdkoaV2ICKDdfPlIg9IT6T5iH5eAE1X9O71kttKnT DG6p51k77tn7DAkEARfvbzDEV2yQOSUNW4x538Uu5HTZ9Vjkvbge37jAsOWvdPJrM6X014vYA eS3csZl5x+v+jFUAVkMbEsLE9/ynqWyhivQbZqGdWw1DP8rgeWrElIAczGH6J3eG3yUvAevmM 0KrnCnC3Gy/wFB8iWQlgWaCcUqKFHxpxv3zgdOznJVBLDwXCJG8YWwcvKCVZcIO7sYy0gZZ78 np4ffM0+zNXeYBGJ4TXFa9rDGLAOuiH4zxWQcgJXxp6i5O7dcZU6iJVtpME6yYUwLx4lXIEcW u+H8gmMOEHxlX740gF/eWaDhknZE4CoX5KTitr5AbggmCso3nQelELXLoRw6VVtON/JPgEuJa SyCrzu/m/fCcMhX+FdEA7LQBShqS3MdOPdlWW8jGo5i6EMgEt8yGh8tWe7b9kI8wH3wcdZlVq nKxub1CKlj6XguU+LWCEEJpRy6Kq+m/z1zYRBG+u9lAULj10rR02QFzyc60+5sbaXFydvEpuu ci7Nn+1jFpjJCd99fOzmwYla6XPyGaDVpBYwszxnMVzWbS2pUbbnr3dhkU+bBbXbTyD8ClT2X mYVS8= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36859 Cc: 36859@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> I hope it would be possible to specify a special action alist entry >>> in 'display-buffer-alist' , e.g. >>> >>> (window-height . no-fit-window) >> >> Wouldn't just (window-height) suffice? > > Maybe, I'm not sure if the case when window-height is missing in alist > can be distinguished from the case when window-height is nil. The important aspect is that a (window-height) entry effectively overrides a (window-height . fit-window-to-buffer) one. > Or maybe 'shrink-window-if-larger-than-buffer' could be added in the body > of another new ALIST argument 'post-display-function'. Where would that 'post-display-function' be called? This wouldn't be any more in the scope of 'display-buffer'. I'm still not convinced that this display buffer then fill buffer then fit/shrink window according to buffer size metaphor makes any sense. If we want to make the window size follow the buffer size, the buffer should have been filled before being displayed. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 04 15:50:52 2019 Received: (at 36859) by debbugs.gnu.org; 4 Aug 2019 19:50:52 +0000 Received: from localhost ([127.0.0.1]:34262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huMWp-0006CR-QY for submit@debbugs.gnu.org; Sun, 04 Aug 2019 15:50:52 -0400 Received: from egyptian.birch.relay.mailchannels.net ([23.83.209.56]:23081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huMWo-0006CJ-G1 for 36859@debbugs.gnu.org; Sun, 04 Aug 2019 15:50:50 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 331421A182F; Sun, 4 Aug 2019 19:50:49 +0000 (UTC) Received: from pdx1-sub0-mail-a13.g.dreamhost.com (100-96-29-186.trex.outbound.svc.cluster.local [100.96.29.186]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id AD9471A1A60; Sun, 4 Aug 2019 19:50:48 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a13.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); Sun, 04 Aug 2019 19:50:49 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Cooperative-Average: 43ce99f4189bb3e1_1564948248983_999959360 X-MC-Loop-Signature: 1564948248983:2772112259 X-MC-Ingress-Time: 1564948248982 Received: from pdx1-sub0-mail-a13.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a13.g.dreamhost.com (Postfix) with ESMTP id 731717FE4A; Sun, 4 Aug 2019 12:50:43 -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=S3rwm59KMmjVJ33Z0p+uXg9FY1M=; b= GQrJnCkTPDB30Dm5nuSmWl/S8e9B0LuJiqw+KoT0iT/TDQzbGXFuwpQPk6dM6NBs SxGAvOPtJj4TKLYrp4KHm1wy8DIeO/IJlzdXbUajvjIBe5pyew8VX54gmTRQJbZI z7TWUWL6xAjP8Hp2QYBLCqDHDP2E5PHpzkCN0HaDQX4= 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-a13.g.dreamhost.com (Postfix) with ESMTPSA id B8A4B7FE67; Sun, 4 Aug 2019 12:50:41 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a13 From: Juri Linkov To: martin rudalics Subject: Re: bug#36859: Customizable fit-window-to-buffer Organization: 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> Date: Sun, 04 Aug 2019 22:27:03 +0300 In-Reply-To: (martin rudalics's message of "Sun, 4 Aug 2019 10:00:20 +0200") Message-ID: <87ef20wzuw.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddruddthedgudeggecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtfedrledunecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtfedrledupdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedv X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36859 Cc: 36859@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Or maybe 'shrink-window-if-larger-than-buffer' could be added in the body >> of another new ALIST argument 'post-display-function'. > > Where would that 'post-display-function' be called? This wouldn't be > any more in the scope of 'display-buffer'. Oops. > I'm still not convinced that this display buffer then fill buffer then > fit/shrink window according to buffer size metaphor makes any sense. > If we want to make the window size follow the buffer size, the buffer > should have been filled before being displayed. In case of an asynchronous command like vc-log and vc-diff postponing display-buffer might be undesirable because their output might be useful to see while still incomplete. OTOH, the current situation is not perfect either: when an asynchronous command finishes, it unexpectedly forces the window resizing. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 05 05:23:43 2019 Received: (at 36859) by debbugs.gnu.org; 5 Aug 2019 09:23:43 +0000 Received: from localhost ([127.0.0.1]:34613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huZDT-0005w0-Hl for submit@debbugs.gnu.org; Mon, 05 Aug 2019 05:23:43 -0400 Received: from mout.gmx.net ([212.227.15.18]:41977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huZDR-0005vn-S2 for 36859@debbugs.gnu.org; Mon, 05 Aug 2019 05:23:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1564997013; bh=kGQNfecqn1xz3mHrmhVecQ3f6URRUKI/x6LQYmA+DPA=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=P3ua1zEHFbL56KEn3PujsvFXdBI5G657W3x2Y7veTg46eG6hwH+MTtWIzHr/Emib5 er18gcKs17zRG/f9qst6ab43CKkxDlknI+a0yms3osIKDTKR1eNag/B1Isqi/Kme2V YnOCdXfM8kClonDVCAViJ1YAZXNvHZo1bbq0lFW8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([213.162.73.205]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MxDkw-1iIYBB1oL2-00xaFM; Mon, 05 Aug 2019 11:23:33 +0200 Subject: Re: bug#36859: Customizable fit-window-to-buffer To: Juri Linkov 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> From: martin rudalics Message-ID: <1779fe6f-3196-a6f9-99af-4344008be1ae@gmx.at> Date: Mon, 5 Aug 2019 11:23:32 +0200 MIME-Version: 1.0 In-Reply-To: <87ef20wzuw.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:cbR6GX6VjqrMefKDCs3WX/2FrmCopHMF4is/z9FX9qqy7cP7Gqn DaNgzZJUKkDpvuTi8joKDIZ7NYzH46D2DDPDDjmfez15R6IBva6Nvcm+Y/I7Hy8gXlkOEYL VJ+LDhIQcmLe3z0iVqM4I8vjGFq2zlplJe0dfPlJ7MAKn42B+6AVaErOgii8b0s9dFy7AlV t+g2BmsE49L7AV4wPrt5w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:PTEBo+mU260=:vjbpKo/2WdefHUjlrAxu2M OGJTvCQs/KH46bVY2VRmBlUGNTUe5w8+mSfzLdDFRiORQy1idD5YD+uNh/SFE6vEG4V4Gxuvy ETEANcrE3OqgfJgsdwGLHG+tvHdAGCB9USfRNN2NybwbYiGdr5Ea42U8eRf+RrfGLUInHljjd wJphqnWWvCS3m/NlNu9vZgDGvGxwBp/PBEdCxuapFUiYd6KOLkPUYwTBBWGivp0afB+f++dvz UQ3WtzRqD6K1gJc+E66CpmCNASCybHDXT8EeYebtrT4fq6D7E8Qhs43zgGvX6b42JzuNCyb7r AMaABHO96n/PF0NcIJRqu2B9mrsdHxz2eABD5lSZblS2c1amaQcQ7A1GajvnfYkEBg9u7RUgZ zANtsbtSxaXO7fA7bwlk9LixxL/MU6VsYZoi9YK8j47c90kTt6ozLAc2jkKp7SkXgx0ETBWC2 oYpnWUSvX6/M+EMY2cHnX0TtGT8QoRIUvo3ASaYQcATOFAHr+LP8DmXimDdV1c01Vz0CW89tn RRP8s20x32AxVhMNhHiRx+RHA9oeplHV5GZZFVQTBlkpMqxG2h79pNz1eXL5zwoBVn2VSqfjg WpqQBPGEEp5smyyMFl0k3MhR8jzXxwDKi8KucIm6VJmn1dB8a9oA8jQwJXdf31giqI3QkFCmy xiE2a/Tkmw0ygFm+BOy21vLWAv2SvbW501pDLEn4hZA207MbG+3Ga3SqhgoYo+Vl3b+n4SagK 5spEXXaqU1bU3/KTtUtbDmrwJZDk528heKfed7oB/IoNr0ohav3b6mJNbhNVwzrKo7804gTI9 4QDR337oAiO6+lZ5nQ2uPr/E4Qnq9Ry5P0zevAJLshz0ase0LEJx4VZO+AWdKQmZm/qzH7aKx FalT9vOYSxuQfnL2tr8Zo5/67ols+vqdh+iqzSzI0ax3CwlMfWYEmiox2kizWjwdz2rGZrABT TzqzlwKNg0fKZBHT1Da7qkpv49doIMQ6WfHjGD2s3gQje2MSNyUwszZH3HTwNBC6yi5BGXKZj 3nHxGS+/DFrOFrkzZjBJ2rUFdjb4MiuponpicLyNHmiiKXQP4p2dXZXYUcfR5GR0Zx6B22pwn sbIR6pFj/b4K5L6oDq6LW6yGXQ6/1ADP6Blz4fp2w+KAkWwkZmAPa2Hx9EfmU0MOKbBx6Tayw QzR2Q= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36859 Cc: 36859@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > In case of an asynchronous command like vc-log and vc-diff > postponing display-buffer might be undesirable because > their output might be useful to see while still incomplete. Agreed. > OTOH, the current situation is not perfect either: > when an asynchronous command finishes, it unexpectedly > forces the window resizing. Then as a rule let's avoid such resizing. I doubt that anyone really wanted it. It's merely the fact that functions like `shrink-window-if-larger-than-buffer' were written that people started to use them wherever applicable ... martin From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 05 18:04:21 2019 Received: (at 36859) by debbugs.gnu.org; 5 Aug 2019 22:04:21 +0000 Received: from localhost ([127.0.0.1]:35997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hul5X-0008Dd-Ih for submit@debbugs.gnu.org; Mon, 05 Aug 2019 18:04:21 -0400 Received: from cheetah.birch.relay.mailchannels.net ([23.83.209.34]:52626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hul5V-0008DU-Me for 36859@debbugs.gnu.org; Mon, 05 Aug 2019 18:04:18 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 9B49B6A2027; Mon, 5 Aug 2019 22:04:15 +0000 (UTC) Received: from pdx1-sub0-mail-a2.g.dreamhost.com (100-96-86-80.trex.outbound.svc.cluster.local [100.96.86.80]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 23C9C6A2FA8; Mon, 5 Aug 2019 22:04:15 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a2.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); Mon, 05 Aug 2019 22:04:15 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Chief-Thoughtful: 3e1c61f55907ba2f_1565042655435_677648690 X-MC-Loop-Signature: 1565042655435:2129804978 X-MC-Ingress-Time: 1565042655434 Received: from pdx1-sub0-mail-a2.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a2.g.dreamhost.com (Postfix) with ESMTP id 9E0D6837E2; Mon, 5 Aug 2019 15:04:09 -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=2lLgBXOWzv7yXwvnGBw1o7LfsnI=; b= IAdSGPkaI/t38LyjjCqWTkXrxNyJT+FzjtXr17so3GEjLc9w0ZkF/JPH5ggFlVf9 qGyoXaqR+IGzCam4pzOMQ/52QH2VGA2IBq8JVuy8vKgCWtHNqTo/WUpLVIWx7X8B Vj0e6kyd9H7OoluuN5mRAOoJqEFEwsYa58tt56tFS9U= 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-a2.g.dreamhost.com (Postfix) with ESMTPSA id 970BB837DE; Mon, 5 Aug 2019 15:04:06 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a2 From: Juri Linkov To: martin rudalics Subject: Re: bug#36859: Customizable fit-window-to-buffer Organization: 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> Date: Tue, 06 Aug 2019 01:03:02 +0300 In-Reply-To: <1779fe6f-3196-a6f9-99af-4344008be1ae@gmx.at> (martin rudalics's message of "Mon, 5 Aug 2019 11:23:32 +0200") Message-ID: <878ss7tgmh.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddruddtledgtdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrdeludenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrdeluddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36859 Cc: 36859@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> OTOH, the current situation is not perfect either: >> when an asynchronous command finishes, it unexpectedly >> forces the window resizing. > > Then as a rule let's avoid such resizing. I doubt that anyone really > wanted it. It's merely the fact that functions like > `shrink-window-if-larger-than-buffer' were written that people > started to use them wherever applicable ... Before disabling window shrinking we need to support its customization, so shrinking could be enabled easily by anyone who wants it. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 05:00:38 2019 Received: (at 36859) by debbugs.gnu.org; 6 Aug 2019 09:00:38 +0000 Received: from localhost ([127.0.0.1]:36495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huvKf-0008Bw-Tg for submit@debbugs.gnu.org; Tue, 06 Aug 2019 05:00:38 -0400 Received: from mout.gmx.net ([212.227.17.22]:57437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huvKe-0008Bb-Dp for 36859@debbugs.gnu.org; Tue, 06 Aug 2019 05:00:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1565082025; bh=fv+AdteyVYgJjHLPXamCyKEN7Yj6q+FQjBF5skHTh20=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=RMOttFUqyaBhPEC7PzsteCQGO9spjUOE0+Lwv8J4gO7xxpGZhDcjexjK07LcnHUpm R7QymyYZW8PveP3XEmZpP+AW8OOSmF9aXRkGh5cHhtS4IOqGRJQ+bfsXxfRNDy2oyb vYn4RFuAwtwDfnzmepTjwXVMljxm8VYyouuDS2Gc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([46.125.249.30]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M2L60-1iDhAT0aLU-00s5zS; Tue, 06 Aug 2019 11:00:25 +0200 Subject: Re: bug#36859: Customizable fit-window-to-buffer To: Juri Linkov 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> From: martin rudalics Message-ID: <1b0ee8ff-2fbb-ad3e-3554-fd73399af4eb@gmx.at> Date: Tue, 6 Aug 2019 11:00:25 +0200 MIME-Version: 1.0 In-Reply-To: <878ss7tgmh.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:p+IMck+3Td2fKVQqZTi4fznQZRavRIeA+so9oWDOYavWw9dVJ/Y rjgfynEENaGP00lBMQy5pAh7BS3YD3yFoxVnS/bRyqiUpuSr9HE2lt79iHAOGOZwBG+77Dk 0lZBIvwfIb4PXNIpTHCz+Cub3a6r0gGNnl0anOk8Dk9AJucQu2OuBL8U+/AVFK9Y3pMutlH ivJVjGTpt9wdsc2v4/fvg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:cV+HBwbjpaI=:i/FOz+kvkpMMG+yPcEuC/Q iuVqP0Zp+y3rfqNl5nYQlfZdZRej2J2Mdzdj1qhCXBpM2NyQWdBqcQjFBasqYdpucMVxSCn1z of+ScQsnun2GKgrB/1eJsfhHhAPWSG9ulVbTepsb65qJlZiWw/4TqeN6DfR4Cl4RyUPYiA69i U5A7aw65KosVzlO+3nc/lVRhF/s4pGXSV/HApv3xS8lJ+G3JSs+3sGy18ZMhsK3bTK3QCls6E VjZIa11ZYvBEXo6ijvxKEGpPc0t4N2ag0wtdYKnYvIsJ/KIYqpN1n3QLd8+nO2kQYKqnbVaCp 5PB5UYGUy05q1fydCVSMlW9FBhwalybZkPKTq0DHiWYW/HCiXycANOwgzLaLaFoBpEle8COAU 86FFWPSPx/GR/lsj3AmwRIU9PQkbpMYZd9QJ76edhevZfszKiupAaKouOWieVQh/uPrczkZ6G nj6eVqeekY0tpr2CD3571JvZt/y4/GGvsAxJ4GcgNPxvH9UKtOuMSQASeBMBIr/v5T79rCoTT kX5SujIxMwaPXvL38QNaSlIC95r05HeLUoZxhi+k0qsaz4VG5NBWO1CBB75+P8/51o33ARc46 Rp/os7yF2JEHNvqAtFC3NG3f0vZk2t3TFRSgWilewc/04p1q5TzP9TWWGBeZpmX4F4yg7qb0L nkdNvo7rPWtarJJ45Bd5d34Yf6gJP1UqsMcb860RGjOs7TTSCeJNRFx+gyWssAYzBqtVHfo4Y Tf75e4yl2V4GsOy6M+a8KFKMu8UVTAkKBFB+qpLDZsXc4mf3fkj6WpZ82xKPs4+a4fSqgSbRR puaBPRyNRomm/vJRlnKVY7IgzQLMNpPeu1EU6Cg3ihOw2vWrE9yWHvlSH6phab26kKQBXG5YC fIKanZhmXoJeT8L4bHJfOZ/aEwMErjiG7gTDsbVuf4RduPZnmCwHAw02TNU7beIVAanfIx86W Z41bhNv3bvKshwDuj2yr2Pid7Q6MT3kUfqVtTjWqo3e4t+jO7tiZqu90H3sZdJhHsT4uZfDpS tiqoqKYjBVvQ+iVIT4pQOk/oR/vsZpkV4vc8Wk2XhcuJhNdA6+rk9mqaJ/SjqujZFb6N/hG4o QdcaQ8baLuMUsqJ+xPK7wNda2mRvzKr7mZeCrWOegfFUb1bZDQbSXk59dBNSLGyG9UVGxILAM o6yN0= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36859 Cc: 36859@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Before disabling window shrinking we need to support its > customization, so shrinking could be enabled easily > by anyone who wants it. Doing this via 'display-buffer' is hardly feasible: We would have to provide some magic that adds the (window-height) and (window-width) functionalities to the sentinel of the process. vc.el uses an advice for that and I'm afraid that's one step too far for `display-buffer'. 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. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 18:18:45 2019 Received: (at 36859) by debbugs.gnu.org; 6 Aug 2019 22:18:45 +0000 Received: from localhost ([127.0.0.1]:37946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv7n3-0000De-Fw for submit@debbugs.gnu.org; Tue, 06 Aug 2019 18:18:45 -0400 Received: from brown.birch.relay.mailchannels.net ([23.83.209.23]:9614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv7n2-0000DW-7W for 36859@debbugs.gnu.org; Tue, 06 Aug 2019 18:18:44 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 396FF1427EA; Tue, 6 Aug 2019 22:18:43 +0000 (UTC) Received: from pdx1-sub0-mail-a95.g.dreamhost.com (100-96-94-166.trex.outbound.svc.cluster.local [100.96.94.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4FD521426CE; Tue, 6 Aug 2019 22:18:42 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a95.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); Tue, 06 Aug 2019 22:18:43 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Whimsical-Gusty: 36c8bfb01b527f65_1565129922615_706552074 X-MC-Loop-Signature: 1565129922615:2675063070 X-MC-Ingress-Time: 1565129922615 Received: from pdx1-sub0-mail-a95.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a95.g.dreamhost.com (Postfix) with ESMTP id DF989816CF; Tue, 6 Aug 2019 15:18:41 -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=+5kzMkTYsxYufxrbA4F83CRm9u4=; b= 1snt+n0wkPUgTQWHiiuMpgjh1skRYlfakSHYvbW2cW1z3+UDEdoFdMxJvV2j+uF/ MS+BHkCzwjvCIYOu6yY6fFSCehCUnTL8PBfil1Hxj3tfAHUyBhBUXIbCXrlrJ/qx ZwZa3q4tW4PyeOqbhVxAR0u78xxttPxSdCAchR1hbMc= 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-a95.g.dreamhost.com (Postfix) with ESMTPSA id 71A10816CD; Tue, 6 Aug 2019 15:18:40 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a95 From: Juri Linkov To: martin rudalics Subject: Re: bug#36859: Customizable fit-window-to-buffer Organization: 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> Date: Wed, 07 Aug 2019 01:16:01 +0300 In-Reply-To: <1b0ee8ff-2fbb-ad3e-3554-fd73399af4eb@gmx.at> (martin rudalics's message of "Tue, 6 Aug 2019 11:00:25 +0200") Message-ID: <87r25yq6se.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrudduuddgtdelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrdeludenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrdeluddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36859 Cc: 36859@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 18:03:08 2019 Received: (at 36859) by debbugs.gnu.org; 7 Aug 2019 22:03:08 +0000 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 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 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) 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 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 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= 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 From: Juri Linkov To: martin rudalics Subject: Re: bug#36859: Customizable fit-window-to-buffer Organization: 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> Date: Thu, 08 Aug 2019 01:01:10 +0300 In-Reply-To: <87r25yq6se.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 07 Aug 2019 01:16:01 +0300") Message-ID: <87o910my8p.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddruddufedgtdejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrdeludenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrdeluddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36859 Cc: 36859@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 08 03:27:27 2019 Received: (at 36859) by debbugs.gnu.org; 8 Aug 2019 07:27:27 +0000 Received: from localhost ([127.0.0.1]:39859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvcpa-0006Ta-W1 for submit@debbugs.gnu.org; Thu, 08 Aug 2019 03:27:27 -0400 Received: from mout.gmx.net ([212.227.17.21]:34785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvcpY-0006TE-EZ for 36859@debbugs.gnu.org; Thu, 08 Aug 2019 03:27:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1565249233; bh=IACTDtqonj0Ps1liSPwSQ2pL9RhwgzmUKvmMaT32BmM=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=WMpJsxzoggad1UkcFDzjZtSGnOrL783Zesjk9YzBGO+6xJF8KGCRtSuQ+srju9un7 hNZEnJcGM2rpRgpm5s76kS+AhcPEsLJ/Km5JUpXO1xDzapR690Qu3BZ3na+/CsTjli R6ReOmPfjtfYICmMtnRnLUodIqS3xh+c/DvKk0HA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([213.162.80.111]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LvPgd-1iL1c20HZb-010dxk; Thu, 08 Aug 2019 09:27:13 +0200 Subject: Re: bug#36859: Customizable fit-window-to-buffer To: Juri Linkov 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> <87o910my8p.fsf@mail.linkov.net> From: martin rudalics Message-ID: <3323fa25-d095-06d1-6318-a902ba70c844@gmx.at> Date: Thu, 8 Aug 2019 09:27:12 +0200 MIME-Version: 1.0 In-Reply-To: <87o910my8p.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:2wlXtZsxZzNv+JiRnZ/fzSMP9lrb3ueVdUwYWKLQliAKaMjhshX bLoEi9ICQQMTWG6U3MoUmiKiYGejjXLhxKdx8HCkV6Pm3BB72ZoTcHlWlt1p4Ffn0U2wApy 0FkGzq3z1gPwuwQR+mCY4ioXdfhVxMTtnxacd+ouOraXEUsIe/z0fpOxGvU0i7mbUgiyGBU /PC9Niju3Ff23l378IPrg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:2Fqli2rO5c0=:fbmeZPiSl3XGLjco/hWZeU fkWZcmg+KoGEZsJYp4Z6Gf54uNpcJUrLYt4kxGi8/jGQPmehxA1RocfcH0jaHFAtU09xg3YL+ QfEB7OgJYuuhG/9zzVJ6VlRetzhrrBfaypDgQVChYv1pmQmPrZAnUzwTfHYE60Na/ADMByquO wDbBXMrZwOH+vHWlZWEDIWAaI5k3xb4rwS7wz2b0ufukUOMRV/c+BfLUDxk7BI2EdSaHNmxbL ZLTlAeBZ7fMAnO3jeCUymbl4beoBUmPVBBAlsUKrntrMLlEpDQebpcr3PysjKmedFvMqcHS0D 7fbyG28AS2Dib776ccVvL+YUg08r5m6jmgc8xX+6bInQLlszxB2WM1O0s9D76qgYzQlYwv0p9 6unosvmRr94R+AAKemSLYIHIslxKu6OEx/I9gjxnZos5M9L2ykeIIm6xkVC2kXYOJDRb/H7wr eZYTV5h8ntKQ4Dv1yN0Tb8FLmj4Vn/wXGZ8+LMNIcc7SWQE4CLH+SewSWon1+uubQxocfFWwO wHliTaamkMNtmjKl/JxhYZCONY3eWzH0wkgE5G/6jQxbKWyzTgoYXJLDA37VHYvZj85sqs1mA dKT3p+fR2DyIkzQ+W128n91chj2WsMY/P0s2+jjNU3lZ3j8edhuuq5Wm1lUVflS5DDEtrniLm kJhcRfaK+zoaP956OWQeYED0CTQQUBXTgiUb1JSCBWkrnP5YvJ4IPgP7Gr1vDN5+yln80XF7y wiyMzajTQici8r1dARUhYThT6Ydt0kSz1ZK6P75cmXaYyqfLWp3KKW3Px3oC1JEc1Uu5ZdZcD 0OFw653bDY2V1Y+0viznz6t1WnH1RjwS9Pa85uLTzKAEC5rrgRCBFnMk319dH3IegHWPYRXUt FOkG+nWs3QAtrYrWUWpqtweGDdw72aZbd+W4ONATk/C10MQVuwbb1DxbTVO7Y45LpRJKxQNDl CNsBv+Sypvr7TBLDMtSzsK9g7JUVYFxw0rgPLsp3EJoKrPfPJjRIesyvIAe1Vef7TPf0FrG6H qpNNH2p8uc3iNeiYdmavqJmBmCpur78qDmX4jWEQbO53P5bsMWex2rVqpw810u4Z19ZqwNlBe UVenCvsizlTh8piu9t4boaKdOoyCDbq504OsGAYzRBxNfbiTpK89YbL4QVYLyOfIMdWC8ZZZ+ 3OU7Y= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36859 Cc: 36859@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 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. What's the scope of a command? When it invokes an asynchonous process does it end when that process starts or when it finishes? Since I think that it's the former (how else could we then distiniguish "this" command from the "last" command), the idiom "post-command" appears inappropriate here. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 08 18:01:30 2019 Received: (at 36859) by debbugs.gnu.org; 8 Aug 2019 22:01:30 +0000 Received: from localhost ([127.0.0.1]:41827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvqTS-0002O0-8m for submit@debbugs.gnu.org; Thu, 08 Aug 2019 18:01:30 -0400 Received: from antelope.elm.relay.mailchannels.net ([23.83.212.4]:9114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvqTP-0002Nr-MC for 36859@debbugs.gnu.org; Thu, 08 Aug 2019 18:01:28 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 9468422D55; Thu, 8 Aug 2019 22:01:26 +0000 (UTC) Received: from pdx1-sub0-mail-a13.g.dreamhost.com (100-96-11-241.trex.outbound.svc.cluster.local [100.96.11.241]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 2595022EE9; Thu, 8 Aug 2019 22:01:26 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a13.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); Thu, 08 Aug 2019 22:01:26 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Vacuous-Stretch: 378d3a9d1533e013_1565301686371_1311821172 X-MC-Loop-Signature: 1565301686371:1138376077 X-MC-Ingress-Time: 1565301686371 Received: from pdx1-sub0-mail-a13.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a13.g.dreamhost.com (Postfix) with ESMTP id 700EC806FB; Thu, 8 Aug 2019 15:01:21 -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=Bvm86HuNw0PnpYt9lr+DggoebIs=; b= KzmzEc17zMwCojNn93SY/VxuKK5hhvwr974VUa5dXY1HfaJH3uONaIH6XHZoBVJg wXodKDLHEvP2me0jOYqZd9T/WmsZw5n4mKhuabD4ziwzd89AE9pXcbN/3ABae+nm mY4iN86N7ZUvGNPGUftS4XTUDrR9ACDhi0MbrenzdKI= 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-a13.g.dreamhost.com (Postfix) with ESMTPSA id 6D3D5803B9; Thu, 8 Aug 2019 15:01:18 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a13 From: Juri Linkov To: martin rudalics Subject: Re: bug#36859: Customizable fit-window-to-buffer Organization: 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> <87o910my8p.fsf@mail.linkov.net> <3323fa25-d095-06d1-6318-a902ba70c844@gmx.at> Date: Fri, 09 Aug 2019 00:39:20 +0300 In-Reply-To: <3323fa25-d095-06d1-6318-a902ba70c844@gmx.at> (martin rudalics's message of "Thu, 8 Aug 2019 09:27:12 +0200") Message-ID: <87sgqbe2td.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrudduiedgtdefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrdeludenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrdeluddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36859 Cc: 36859@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> 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. > > What's the scope of a command? When it invokes an asynchonous process > does it end when that process starts or when it finishes? Since I > think that it's the former (how else could we then distiniguish "this" > command from the "last" command), the idiom "post-command" appears > inappropriate here. Indeed vc-post-command-functions is a misnomer, and should have been called vc-post-process-functions. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 18 12:21:32 2021 Received: (at control) by debbugs.gnu.org; 18 Oct 2021 16:21:32 +0000 Received: from localhost ([127.0.0.1]:48356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcVOG-0001M3-Hr for submit@debbugs.gnu.org; Mon, 18 Oct 2021 12:21:32 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:52401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcVOE-0001Lj-MG; Mon, 18 Oct 2021 12:21:31 -0400 Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id EF10D1C0013; Mon, 18 Oct 2021 16:21:23 +0000 (UTC) From: Juri Linkov To: martin rudalics Subject: Re: bug#51062: Customizable window resizing Organization: LINKOV.NET References: <87zgrm2h6v.fsf@mail.linkov.net> <63433373-a57b-a68a-8ccc-6d4a9192d9a4@gmx.at> <871r4oahjx.fsf@mail.linkov.net> <87wnmfk40w.fsf@mail.linkov.net> <87a6jbil4d.fsf@mail.linkov.net> Date: Mon, 18 Oct 2021 19:10:50 +0300 In-Reply-To: <87a6jbil4d.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 14 Oct 2021 20:14:58 +0300") Message-ID: <87o87mmjth.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control Cc: 51062@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) forcemerge 36859 51062 stop >> What was that hook called? > > This hook was called 'after-display-buffer-function' in > https://debbugs.gnu.org/45688#137 Actually, the right name was 'vc-post-process-functions' proposed in bug#36859 (merged). From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 29 12:32:26 2021 Received: (at control) by debbugs.gnu.org; 29 Dec 2021 17:32:26 +0000 Received: from localhost ([127.0.0.1]:50238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2coM-0000H0-G1 for submit@debbugs.gnu.org; Wed, 29 Dec 2021 12:32:26 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:43515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2coK-0000GX-6s; Wed, 29 Dec 2021 12:32:25 -0500 Received: (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id A39BA2000A; Wed, 29 Dec 2021 17:32:15 +0000 (UTC) From: Juri Linkov To: martin rudalics Subject: Re: bug#51062: Customizable window resizing Organization: LINKOV.NET References: <87zgrm2h6v.fsf@mail.linkov.net> <63433373-a57b-a68a-8ccc-6d4a9192d9a4@gmx.at> <871r4oahjx.fsf@mail.linkov.net> <87wnmfk40w.fsf@mail.linkov.net> <87a6jbil4d.fsf@mail.linkov.net> <87o87mmjth.fsf@mail.linkov.net> <377a69a2-7694-bd7a-ac63-409e5064e5c9@gmx.at> Date: Wed, 29 Dec 2021 19:27:07 +0200 In-Reply-To: <377a69a2-7694-bd7a-ac63-409e5064e5c9@gmx.at> (martin rudalics's message of "Mon, 18 Oct 2021 19:44:15 +0200") Message-ID: <86czlf1fv8.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control Cc: 51062@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) forcemerge 51062 52855 stop >> Actually, the right name was 'vc-post-process-functions' >> proposed in bug#36859 (merged). > > You mean to run 'shrink-window-if-larger-than-buffer' from that hook > unless the user removed it? The problem is that the argument of this function should be a buffer, not a window as in 'shrink-window-if-larger-than-buffer'. This is why bug#52855 proposed to add a new function shrink-buffer-if-larger-than-buffer But not sure if this should be added to window.el, or better to leave in vc.el with the name vc-shrink-buffer? From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 11 12:36:16 2022 Received: (at control) by debbugs.gnu.org; 11 Jan 2022 17:36:16 +0000 Received: from localhost ([127.0.0.1]:55460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7L4C-0007Qd-A4 for submit@debbugs.gnu.org; Tue, 11 Jan 2022 12:36:16 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:52753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7L48-0007QD-3m; Tue, 11 Jan 2022 12:36:14 -0500 Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 43B691C0004; Tue, 11 Jan 2022 17:36:03 +0000 (UTC) From: Juri Linkov To: martin rudalics Subject: Re: bug#51062: Customizable window resizing Organization: LINKOV.NET References: <87zgrm2h6v.fsf@mail.linkov.net> <63433373-a57b-a68a-8ccc-6d4a9192d9a4@gmx.at> <871r4oahjx.fsf@mail.linkov.net> <87wnmfk40w.fsf@mail.linkov.net> <87a6jbil4d.fsf@mail.linkov.net> <87o87mmjth.fsf@mail.linkov.net> <377a69a2-7694-bd7a-ac63-409e5064e5c9@gmx.at> <86czlf1fv8.fsf@mail.linkov.net> <3c447b7e-7ce3-14fe-03d5-63cb7f75d783@gmx.at> <86bl0rgas3.fsf@mail.linkov.net> <7c39d839-3405-dad3-4e45-90152744e48f@gmx.at> Date: Tue, 11 Jan 2022 19:35:33 +0200 In-Reply-To: <7c39d839-3405-dad3-4e45-90152744e48f@gmx.at> (martin rudalics's message of "Tue, 4 Jan 2022 11:27:11 +0100") Message-ID: <86pmoynpju.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control Cc: 51062@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) close 51062 29.0.50 thanks >>> "shrink-buffer-if-larger-than-buffer"? Maybe this should become >>> 'shrink-buffer-window-if-larger-than-buffer' then. >> >> Should such a function be added to window.el? > > Maybe. But we could also rename the first argument of > 'shrink-window-if-larger-than-buffer' to WINDOW-OR-BUFFER. This can't be generalized because vc uses specific logic: (let ((window (get-buffer-window buffer t))) (with-current-buffer buffer ... (when window (shrink-window-if-larger-than-buffer window)))) >>> With the usual problem what to do when there are two windows showing >>> that buffer. >> >> It's understandable why vc-diff-internal and vc-diff-finish >> use get-buffer-window to get a window: >> >> vc-diff-internal: >> (pop-to-buffer (current-buffer)) >> (let ((buf (current-buffer))) >> (vc-run-delayed (vc-diff-finish buf ... >> >> vc-diff-finish: >> (let ((window (get-buffer-window buffer t))) >> (with-current-buffer buffer >> ... >> (when window >> (shrink-window-if-larger-than-buffer window)))) >> >> This is needed to handle the case when the window was deleted >> before the vc command finished. >> >> But why vc-log-internal-common doesn't so the same? >> >> vc-log-internal-common: >> (pop-to-buffer buffer) >> (vc-run-delayed >> ... >> (shrink-window-if-larger-than-buffer) >> >> So I posted a patch in bug#52855 to use the same function >> that relies on get-buffer-window in both cases. >> >> But it seems you propose to remember the window with e.g. >> >> (setq window (pop-to-buffer (current-buffer))) >> >> then to use it in: >> >> (run-hook-with-args 'vc-diff-finish-functions window) >> >> where the defalut value of 'vc-diff-finish-functions' is: >> >> '(shrink-window-if-larger-than-buffer) >> >> Then 'shrink-buffer-window-if-larger-than-buffer' is not needed. > > Personally I dislike abusing hooks like that. But I probably do not use > vc-... much either. And it would require a weird condition: (when window (run-hook-with-args 'vc-diff-finish-functions window)) > So do whatever you like more. So instead of above, I pushed the original patch with a better function name 'vc-shrink-buffer-window'. From unknown Fri Jun 20 07:15:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 09 Feb 2022 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator