From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22404: 25.1.50; Forcing `window-scroll-functions` to run. Date: Mon, 08 Feb 2016 19:17:15 +0200 Message-ID: <83d1s7qfz8.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1454955233 9164 80.91.229.3 (8 Feb 2016 18:13:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Feb 2016 18:13:53 +0000 (UTC) Cc: 22404@debbugs.gnu.org To: Keith David Bershatsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 08 19:13:42 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aSqJe-0001v4-DC for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Feb 2016 19:13:38 +0100 Original-Received: from localhost ([::1]:47493 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSqJd-0007Pd-PR for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Feb 2016 13:13:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSqJ9-0006pC-RP for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2016 13:13:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSqJ5-0000J5-1A for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2016 13:13:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSqJ4-0000J0-Ul for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2016 13:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aSqJ4-0000f1-TT for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2016 13:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Feb 2016 18:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22404-submit@debbugs.gnu.org id=B22404.14549551332441 (code B ref 22404); Mon, 08 Feb 2016 18:13:02 +0000 Original-Received: (at 22404) by debbugs.gnu.org; 8 Feb 2016 18:12:13 +0000 Original-Received: from localhost ([127.0.0.1]:60333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSqIG-0000dB-Gj for submit@debbugs.gnu.org; Mon, 08 Feb 2016 13:12:12 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43544) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSqIB-0000b7-VO for 22404@debbugs.gnu.org; Mon, 08 Feb 2016 13:12:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSpRM-0002PR-8S for 22404@debbugs.gnu.org; Mon, 08 Feb 2016 12:17:33 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSpRM-0002PN-5I; Mon, 08 Feb 2016 12:17:32 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1486 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aSpRL-0005JE-H9; Mon, 08 Feb 2016 12:17:31 -0500 In-reply-to: (message from Keith David Bershatsky on Mon, 08 Feb 2016 00:51:44 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112720 Archived-At: > Date: Mon, 08 Feb 2016 00:51:44 -0800 > From: Keith David Bershatsky > Cc: 22404@debbugs.gnu.org > > I noticed that redisplay handles a large yank/paste by erroneously letting the user see for a split second that point is partially visible on the bottom of the screen (when `scroll-conservatively` is 101), and then redisplay fixes the display by moving the lines up far enough to bring point back into view. That behavior appears to be a bug -- i.e., Emacs should internally know that point is partially visible at the bottom of the screen following a large yank and then patiently wait to display the finished product until point is fully visible. This is most noticeable in my own minor-mode that can take up to .040 seconds to perform its calculations with `vertical-motion'. A reproducible recipe will be appreciated (in a separate bug report, please). I'm guessing that some redisplay optimization causes the slightly inaccurate display, which is thereafter fixed. If so, it could be that the conditions for that optimization should be fixed. > + CALLN (Frun_hook_with_args, Qwindow_start_end_hook, window, > + make_number (startp_integer), > + make_number (endp), > + make_number (pbol_startp), > + make_number (peol_endp), > + fully_p ? Qt : Qnil); When calling Lisp from redisplay, always use safe_call, to be protected against errors signaled by that Lisp. > + w->window_start_end_hook_pending = false; For the same reason, reset the flag _before_ calling Lisp, not after, so that if Lisp does signal an error, the flag will be reset, and won't cause the hook to be called ad nauseam.