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: Tue, 05 Jul 2016 04:12:30 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1467706386 23126 80.91.229.3 (5 Jul 2016 08:13:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Jul 2016 08:13:06 +0000 (UTC) Cc: 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 10:12:56 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 1bKLTU-0003QS-H4 for ged-emacs-devel@m.gmane.org; Tue, 05 Jul 2016 10:12:56 +0200 Original-Received: from localhost ([::1]:52947 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKLTT-0000hL-K2 for ged-emacs-devel@m.gmane.org; Tue, 05 Jul 2016 04:12:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKLTJ-0000fe-RM for emacs-devel@gnu.org; Tue, 05 Jul 2016 04:12:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKLTI-0007Zd-Uf for emacs-devel@gnu.org; Tue, 05 Jul 2016 04:12:45 -0400 Original-Received: from smtp-as-02-03.vtxnet.net ([194.38.175.142]:55318 helo=smtp-as-02.vtxnet.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKLTD-0007Yt-4G; Tue, 05 Jul 2016 04:12:39 -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 AFCBB47833; Tue, 5 Jul 2016 10:12:35 +0200 (CEST) Original-Received: from smtp-pri-03.vtxnet.net (smtp-pri-03-1.vtxnet.net [212.147.62.147]) by smtp-as-02.vtxnet.net (Postfix) with ESMTP id 76F1546ABB; Tue, 5 Jul 2016 10:12:33 +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-03.vtxnet.net (VTX Services SA) with ESMTP id 6A93668B7EC; Tue, 5 Jul 2016 10:12:33 +0200 (CEST) Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 77D38AE0BC; Tue, 5 Jul 2016 04:12:30 -0400 (EDT) In-Reply-To: (Keith David Bershatsky's message of "Mon, 04 Jul 2016 15:50:42 -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:205167 Archived-At: > The implementation of the `window-start-end-hook` is probably easier to > explain with a diff, which is attached. Hmm... my understanding of the redisplay code is sufficiently fuzzy that your patch doesn't actually tell me how it's supposed to work. More specifically the timing is unclear to me: the overlays you add from your hook affect the display, so you need to run (the bulk of) the redisplay code *after* running your hook. So sounds more like a pre-redisplay-hook. Except that you pre-compute the expected window-end somehow. Stefan