From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#16475: enhancement request: remove vertical scroll bar automatically when not needed Date: Thu, 26 Oct 2017 09:56:59 +0200 Message-ID: <59F1954B.7080705@gmx.at> References: <8bfbddfb-237e-47b1-aed7-b28fc97d1f92@default> <59F04174.6090601@gmx.at> <83po9b8f53.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1509004890 28396 195.159.176.226 (26 Oct 2017 08:01:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 26 Oct 2017 08:01:30 +0000 (UTC) Cc: 16475@debbugs.gnu.org, esq@lawlist.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 26 10:01:22 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7d6D-0005Gw-Up for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Oct 2017 10:01:10 +0200 Original-Received: from localhost ([::1]:51521 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7d6L-00030x-DG for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Oct 2017 04:01:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7d3F-0000YU-SB for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 03:58:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7d3C-0003zu-05 for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 03:58:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53509) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7d3B-0003zp-T7 for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 03:58:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e7d3B-0005x0-MH for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 03:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Oct 2017 07:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16475 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16475-submit@debbugs.gnu.org id=B16475.150900465722841 (code B ref 16475); Thu, 26 Oct 2017 07:58:01 +0000 Original-Received: (at 16475) by debbugs.gnu.org; 26 Oct 2017 07:57:37 +0000 Original-Received: from localhost ([127.0.0.1]:33957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7d2m-0005wL-Q4 for submit@debbugs.gnu.org; Thu, 26 Oct 2017 03:57:36 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:63468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7d2l-0005w6-CH for 16475@debbugs.gnu.org; Thu, 26 Oct 2017 03:57:35 -0400 Original-Received: from [192.168.1.100] ([46.125.250.87]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lk81O-1db3RV3fzu-00cA6c; Thu, 26 Oct 2017 09:57:12 +0200 In-Reply-To: <83po9b8f53.fsf@gnu.org> X-Provags-ID: V03:K0:tr4oWuXgtxkgimJS6CHxLxC2FJd5iOf+eXasEqFUQEKpErvEMc3 0c7//8nBnLfAOmmygmiMtd09zCIVBwZcLRFQHWLLhYLz56rCHYUqwWduDjGrgb/4BUagseX h27vC5Bw6r7jTp4sS4L8/hbztWL6B5GLzxqj4lLGrJvNNW/N1UbUnCOw7bbMp/jEOE5aOul 4noyclfUOkk35xYf7HOcg== X-UI-Out-Filterresults: notjunk:1;V01:K0:q7XQX0NfXUk=:/SQdTnVCRhfsDa2RYgXmZv 19gPakYTDEr5U2fFsN0rVVfDZ1mNnkzFlox4EZD8w7wULCMBtk0hLzZncVmARnlOoNPj+zyCX IUwWk/cEX1ya94YF9upeFxOJhMt1sTShEL2MmXryawp8LtxI0yLeiQEeOywEmkFA2gXn5cBtF lW5OSY5L6D7KlmgoFbjigA5IOLTR9IvNYepU2pBuDX0XES9zpKi9IGVDAEnzDK6dx2qWECcES VscnuipeGHLBTa4TVqBVCHuIRyLfWl7R0J2cOqYQgVDgnW7h9ULDT0ampUIied7eWbur7dAH9 mLKV6DM7In5sFCwXBJp8AWymADAzbE0cwoVxZBvJsPvz5ZGwJGXGtn4s6Gm9m6DrTeBxFwR7O Bcot3drEipuTw+0V4Da2tOzASmtDi3rp5/CqlZKKJ2ufkBjXZ7FCF7Pu4uyLN1Yrle+c+ufxm V9bmInGJhIWlNxM68kwfUXEh5ba0QVRgxDa5jb1wgK1G9WGnp4CrxY74P2sg44WG8/iwRckZ8 vxjRgCGKjFqz5gEmpR0KUB91/tRCqhGls+z7XCxjN48fvsh4wCo0puqx0TzPP9H39uEeSpFxO k0obRmNcA7Xa1A5g7yH07Py8nc40fXbWhUGNcNAlXzANRPCoo/ap07IoVNsye2qyRvi8oO9d/ I//gj+guH0c/EhjzzT0rnvPmCib51UaZG0kF0zmvYj9bWLbWxQApwctRFN4GZaZSdPNBPcnPO 8hip8zSR08tw/2WgSe5X36PaTShENY/DaUplV99QIX/qGZ+A85FQq8R9IWzAkQy4KCk52Jwk 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: 208.118.235.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:138999 Archived-At: > More importantly, removing the scroll bar resizes the external > dimensions of the frame, to keep the windows' dimensions unchanged > (otherwise, we couldn't remove the scroll bars at the very end of the > window's redisplay). You can see this in action if you toggle > scroll-bar-mode on and off. So when the window shows _almost_ all the= > text of the buffer, the frame would annoyingly oscillate in its > horizontal dimension. This could be caused, for example, by echo-area= > messages that resize the mini-window from time to time, or by the user= > adjusting the window size. Obviously, an equivalent of =E2=80=98set-window-scroll-bars=E2=80=99 woul= d have to be used here. > By contrast, other applications I saw that remove the scroll bar when > it is not needed leave the frame's dimensions alone, and instead leave= > more space for text display. That is much better, but doing this in > Emacs would require to restructure the code that deals with the scroll= > bars, because we cannot change window dimensions after all the > redisplay decisions were made, without requiring one more redisplay > cycle. We cannot simply remove scroll bars by "clearing" the unused space with the window's background whatever that is. There might be a highlighted region or some other background that extends to the end of the line on any line displayed in that window. And obviously we have to "move" the fringes and the margins to the right and I didn't even talk about scroll bars on the left ... >> Auto-removal of horizontal scroll bars is more complicated. Basicall= y, >> we could remove the horizontal scroll bar when no line in the window = had >> to be truncated. But then we have space to display the next buffer l= ine >> and that line could be awfully long. > > Actually, I think what happens with the removal of the horizontal > scroll bar mirrors the vertical scroll bar, just in the other > dimension. Namely, the frame's height is modified to leave the > windows' dimensions unaltered. But again, this could easily cause > annoying "oscillations" of the frame borders. Again =E2=80=98set-window-scroll-bars=E2=80=99 would take care of that. martin