From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#22404: 25.1.50; Forcing `window-scroll-functions` to run. Date: Fri, 29 Jan 2016 13:00:42 +0100 Message-ID: <87d1sk389h.fsf@web.de> References: <8337tq8yp6.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1454068924 4515 80.91.229.3 (29 Jan 2016 12:02:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Jan 2016 12:02:04 +0000 (UTC) Cc: Keith David Bershatsky , 22404@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 29 13:01:53 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 1aP7jq-0003SU-Op for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Jan 2016 13:01:18 +0100 Original-Received: from localhost ([::1]:33729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aP7jm-0007qO-UI for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Jan 2016 07:01:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aP7je-0007py-Pn for bug-gnu-emacs@gnu.org; Fri, 29 Jan 2016 07:01:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aP7ja-0005u0-OP for bug-gnu-emacs@gnu.org; Fri, 29 Jan 2016 07:01:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aP7ja-0005tv-LE for bug-gnu-emacs@gnu.org; Fri, 29 Jan 2016 07:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aP7ja-00039Z-Co for bug-gnu-emacs@gnu.org; Fri, 29 Jan 2016 07:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Jan 2016 12:01: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.145406885912105 (code B ref 22404); Fri, 29 Jan 2016 12:01:02 +0000 Original-Received: (at 22404) by debbugs.gnu.org; 29 Jan 2016 12:00:59 +0000 Original-Received: from localhost ([127.0.0.1]:40332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aP7jX-00039B-JB for submit@debbugs.gnu.org; Fri, 29 Jan 2016 07:00:59 -0500 Original-Received: from mout.web.de ([212.227.15.4]:56488) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aP7jV-00038x-Fq for 22404@debbugs.gnu.org; Fri, 29 Jan 2016 07:00:57 -0500 Original-Received: from drachen.dragon ([92.77.162.209]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0LvSQV-1Zy0UQ0PAJ-010c4L; Fri, 29 Jan 2016 13:00:45 +0100 In-Reply-To: <8337tq8yp6.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 21 Jan 2016 22:28:05 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:F9J7Q06ZXB2BjEXkfZNphkhber21CZt/z8wktGuqWXbnjR0HDBq lD/XyRfbA4jz1sEBV0Fiw13sO6pR5jFbxLvWGRRzEOtrbgai0MVv2163DgzcjCC8gjhbPb2 1N1KCUtiNa1VHlVUhl53tMLwclzUvqw1CTlmcyvPzEDHynuqm0OwYWHLEfqIlNMh78Awgwk Ibu2Mwnitkr2cfmegv39A== X-UI-Out-Filterresults: notjunk:1;V01:K0:4RF/jeIWGBc=:lp2YnLBAu13DNbE8Sqgt5U +hpZLq73sjeZS2cH1haK62KoqploMzHvvVVqWiuTq+J/7GpAJtIRZ2+mit71gjKIw7qWR/zT2 2a8P4OhOl40Z7wYW+r6heXdOWRVVO9HfCLZSphDYTcAmQyOmVIpZoSNy5wB+uMyEL9Z4EiXCm EBUq5OVyO93vVZDJqfSoH9bm0zYH5ONzR9WMdW80b2K7osY6AJCrIiDGQ5NHARtzNCIzxWeUU bBI8dnduLFB6t4QhiwaG3LkCVgrQR4T1g8lIJ3XFzoUi9SBfgJGHJMAhO71P9POQiIaQoosBb LDAmqxsxRLsitMIFspkspgUyjwIzr5nnA/aIjAT83RlI6CrNlnDhcDdnclogWB69QLF8to+to CEPUbU6MTczWpSdrwu9hii3T8JktGqI0Uv9rBa0aepwRqNF+ziJpfynyPyQqDP8MAdALIkLm+ n8bZRzxGH9ZQKscSy8Qsc5mTh5Et0nwlqfP0SLWkpKzlc5xIwh3AyG8tty3VIA/9yiuLaU29j v3TRC1ItL0pdNXuQyBIw26h3v0HIzo+74egCDiopajhD6bp3qv1fVUjC2CeZLe1bb3eaznIKj /RhA59HTYVWaZ0Znl041hk1xDoETrNW3AQzHkt3V+6nIYpnPPNCNFrqWt+POQ6veoo0yZILQR YNpF1WZ299l8IbqMpe2dSbnhYbg2cPg0l7adC7dOhbbPhz0R6Qch2p0Sfz3I6enmdx0dvupoW r6zYaSpuYCT11VD7B5EQ0ng3aCGSrGmi6sPuFeFNIhabN3xXKynBYR+DmnXA92aXqvcyabsm 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:112077 Archived-At: Eli Zaretskii writes: > The other thing I still don't understand is how forcing > window-scroll-functions to run could fix your problem or _avoiding_ > extra calculations. Where and under what conditions would you call > the function that forces Emacs to run window-scroll-functions? > Doesn't that waste processing in those cases where normally > window-scroll-functions didn't need to be run (because window-start > and window-end don't change)? IOW, aren't you running those costly > calculations from window-scroll-functions? FWIW, I ran into this class of problems for several times: after scrolling had been happening, I want to do something with the newly visible area of the buffer (e.g., place overlays). The main problem here is that even when window-scroll-function run, AFAIK the value of `window-end' can still be outdated, even when called with the update argument. I didn't need to use post-command-hook in my cases, so it's a bit different from what Keith wants. Anyway, using pre-command-hook is too late for us: it's not executed unless the next input arrives, so you have to hit a key until decorations or whatever get updated. The only solution I know of is to do things in a timer, which works, but not nicely (you sometimes get delays). Regards, Michael.