From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Keith David Bershatsky <esq@lawlist.com>
Newsgroups: gmane.emacs.bugs
Subject: bug#16475: enhancement request: remove vertical scroll bar
	automatically when not needed
Date: Thu, 26 Oct 2017 09:03:10 -0700
Message-ID: <m24lql99s1.wl%esq@lawlist.com>
References: <8bfbddfb-237e-47b1-aed7-b28fc97d1f92@default>
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
X-Trace: blaine.gmane.org 1509033870 28600 195.159.176.226 (26 Oct 2017 16:04:30 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 26 Oct 2017 16:04:30 +0000 (UTC)
Cc: 16475@debbugs.gnu.org
To: Eli Zaretskii <eliz@gnu.org>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 26 18:04:20 2017
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1e7kde-0005NC-Cb
	for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Oct 2017 18:04:11 +0200
Original-Received: from localhost ([::1]:53707 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1e7kdj-0002Sd-Vy
	for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Oct 2017 12:04:16 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49019)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1e7kdZ-0002Ps-IM
	for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 12:04:06 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1e7kdW-0000rV-C6
	for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 12:04:05 -0400
Original-Received: from debbugs.gnu.org ([208.118.235.43]:54840)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
	id 1e7kdW-0000rN-8Q
	for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 12:04:02 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1e7kdV-0004f6-Vt
	for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 12:04:02 -0400
X-Loop: help-debbugs@gnu.org
In-Reply-To: <8bfbddfb-237e-47b1-aed7-b28fc97d1f92@default>
Resent-From: Keith David Bershatsky <esq@lawlist.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Thu, 26 Oct 2017 16:04:01 +0000
Resent-Message-ID: <handler.16475.B16475.150903379617861@debbugs.gnu.org>
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.150903379617861
	(code B ref 16475); Thu, 26 Oct 2017 16:04:01 +0000
Original-Received: (at 16475) by debbugs.gnu.org; 26 Oct 2017 16:03:16 +0000
Original-Received: from localhost ([127.0.0.1]:35288 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1e7kcl-0004e1-Se
	for submit@debbugs.gnu.org; Thu, 26 Oct 2017 12:03:16 -0400
Original-Received: from gateway30.websitewelcome.com ([192.185.197.25]:40278)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <esq@lawlist.com>) id 1e7kcj-0004ds-B5
	for 16475@debbugs.gnu.org; Thu, 26 Oct 2017 12:03:13 -0400
Original-Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8])
	by gateway30.websitewelcome.com (Postfix) with ESMTP id 7CCA479F2
	for <16475@debbugs.gnu.org>; Thu, 26 Oct 2017 11:03:12 -0500 (CDT)
Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP
	id 7kcieddo0DL8r7kcieUBws; Thu, 26 Oct 2017 11:03:12 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com
	; s=default;
	h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date:
	Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:
	Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
	In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
	List-Post:List-Owner:List-Archive;
	bh=6MxFR5EWmK1sI2sSQ4WhKYUitLRGKEeGJlLAqwsSK9g=;
	b=dejKL9Fswb+ydJmYEbplHMFBBF
	mqsM8yX1q4Fks++NF4S+gxscg3gUuKF5w/o45yUxuLkox8tShjzQwPI58EA+3/vOWui6gdaLrPsDt
	jplir+ogoFqgATrIRvrtqcTzQtBjwNxWedFqhZ8KdOoydYLYYz4J4F1kVg0KUrHq5Jqgx6S34/9Dw
	ymJBVgIua4OFF88N0w6GfIHJ70RzQA1YP9eLcNGM538hO1VvksQ/+DKzPnfjCPusFzwU7tA7qqwJ3
	Rmbew9MPRR2Y6ed4+LT3HiK6vfuYruTq8vTaPJzQLoedwcQFXREPLP+ljFgDHkLIKDpwmNwVIccN1
	hHqomqrw==;
Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:49266
	helo=server.private)
	by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256)
	(Exim 4.87) (envelope-from <esq@lawlist.com>)
	id 1e7kch-000VLB-Fb; Thu, 26 Oct 2017 11:03:11 -0500
X-AntiAbuse: This header was added to track abuse,
	please include it with any abuse report
X-AntiAbuse: Primary Hostname - gator3053.hostgator.com
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - lawlist.com
X-BWhitelist: no
X-Source-IP: 45.48.239.195
X-Source-L: No
X-Exim-ID: 1e7kch-000VLB-Fb
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.private)
	[45.48.239.195]:49266
X-Source-Auth: lawlist
X-Email-Count: 2
X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t
X-Local-Domain: yes
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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-gnu-emacs/>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: "bug-gnu-emacs"
	<bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.bugs:139015
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/139015>

The values for window-start and window-end will not necessarily be accurate until somewhere towards the end of redisplay.  A test that relies upon those values to add/remove scroll bars will often fail.

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

DATE:  [10-26-2017 08:59:02] <26 Oct 2017 18:59:02 +0300>
FROM:  Eli Zaretskii <eliz@gnu.org>
> 
> * * *
> 
> I agree, but then the right place to call this is not from redisplay,
> but from keyboard.c, before it calls read_char (which calls
> redisplay).  set-window-scroll-bars triggers a redisplay cycle, so
> calling it from (the end of) redisplay is not very wise, IMO.