From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Use cases for post-redisplay hooks Date: Mon, 04 Jul 2016 18:06:33 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1467670037 9519 80.91.229.3 (4 Jul 2016 22:07:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2016 22:07:17 +0000 (UTC) Cc: michael_heerdegen@web.de, Eli Zaretskii , =?windows-1252?Q?Cl=E9ment?= Pit--Claudel , emacs-devel@gnu.org To: Keith David Bershatsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 05 00:07:04 2016 Return-path: Envelope-to: ged-emacs-devel@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 1bKC19-0005AO-0a for ged-emacs-devel@m.gmane.org; Tue, 05 Jul 2016 00:07:03 +0200 Original-Received: from localhost ([::1]:50760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKC17-0004rn-U3 for ged-emacs-devel@m.gmane.org; Mon, 04 Jul 2016 18:07:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKC0w-0004rV-Ay for emacs-devel@gnu.org; Mon, 04 Jul 2016 18:06:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKC0s-0001QV-6D for emacs-devel@gnu.org; Mon, 04 Jul 2016 18:06:47 -0400 Original-Received: from smtp-as-02-03.vtxnet.net ([194.38.175.142]:50892 helo=smtp-as-02.vtxnet.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKC0n-0001PO-06; Mon, 04 Jul 2016 18:06:41 -0400 Original-Received: from smtp-as-02.vtxnet.net (localhost [127.0.0.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-as-02.vtxnet.net (Postfix) with ESMTPS id D59F74537C; Tue, 5 Jul 2016 00:06:38 +0200 (CEST) Original-Received: from smtp-pri-01.vtxnet.net (smtp-pri-01.vtxnet.net [212.147.62.135]) by smtp-as-02.vtxnet.net (Postfix) with ESMTP id 0BC444537D; Tue, 5 Jul 2016 00:06:37 +0200 (CEST) Original-Received: from fmsmemgm.homelinux.net (dyn.144-85-234-142.dsl.vtx.ch [144.85.234.142]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-pri-01.vtxnet.net (VTX Services SA) with ESMTP id EAB3CCFCEC; Tue, 5 Jul 2016 00:06:36 +0200 (CEST) Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 01BC3AE5F2; Mon, 4 Jul 2016 18:06:33 -0400 (EDT) In-Reply-To: (Keith David Bershatsky's message of "Mon, 04 Jul 2016 14:42:46 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 194.38.175.142 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:205160 Archived-At: > I am using a slightly modified version of Emacs that has what > I call a `window-start-end-hook`, which lets me draw overlays on just the > visible window every command loop. I needs more work, but that is the > general idea of the modification. Could you clarify what you use it for? Also is it run after redisplay? If so, how does it work? I mean how do you add overlays *after* redisplay? Do you trigger a second redisplay right after the first, or is it simply that your overlays don't affect the display? > There are certain movements of point that are not covered by the > `window-scroll-functions` hook, so that hook cannot be used reliably for the > above-mentioned purpose. Not sure what point has to do with window-start-end-hook. > And, the hook *may* run more than once each command loop, leading to > potentially wasted time spent running an overlay function that will > need to run again anyway before the display cycle finishes. Is that a problem in practice? Stefan