From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Use cases for post-redisplay hooks Date: Mon, 11 Jul 2016 00:17:11 +0200 Message-ID: <5782C967.8020905@gmail.com> References: <577A9156.9070007@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="w6gJih3C9uu5P6eh8D6owU7V0edb9H9X4" X-Trace: ger.gmane.org 1468189053 29563 80.91.229.3 (10 Jul 2016 22:17:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Jul 2016 22:17:33 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 11 00:17:24 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 1bMN2R-0008WH-Ka for ged-emacs-devel@m.gmane.org; Mon, 11 Jul 2016 00:17:23 +0200 Original-Received: from localhost ([::1]:57018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMN2Q-0004eI-PW for ged-emacs-devel@m.gmane.org; Sun, 10 Jul 2016 18:17:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMN2K-0004dJ-Ro for emacs-devel@gnu.org; Sun, 10 Jul 2016 18:17:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMN2G-0000xB-K7 for emacs-devel@gnu.org; Sun, 10 Jul 2016 18:17:15 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.13]:63518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMN2G-0000wz-94 for emacs-devel@gnu.org; Sun, 10 Jul 2016 18:17:12 -0400 Original-Received: from [192.168.1.82] ([109.24.225.43]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0LkRpr-1aoxA41dCF-00cU8V for ; Mon, 11 Jul 2016 00:17:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 In-Reply-To: <577A9156.9070007@gmail.com> X-Provags-ID: V03:K0:lTbR4S9P9wIMb9EMsXPWabRO535hidgey5Cv7KIcKMuFPtMKJRm f3NvZs99l+NyOa/WAPws28RIeg4ecnauJhddL19Bdx0pKGNnz+RawIGFKFCxbxenFskMklk Wg+N6DMRkHcVvJMfLcM3VhizPjQaUAgxEDlen3Oy4tBstynJuIFQ5rn/ST4jVoGKOy760kC k4q4ptxMGUBmfqzAMlJRQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:d9h2NPSmPes=:bpBJSrNA/NK8mDREZQmUQ6 I0ZeUHyQX9lvOdc9C6X95M/Xn3SNF4e9ttg58HfTLu4IsPO3iYbpzgFFtXC9+rohJCb09Ww2q xOTXAbui5FdA7X8hbwByb+fi+3mXJlth/WcbsdPLyvtoR8yVe3jO9sLPELAlCCA06XdgoM/AX g14SaKOfQFW0ecUPegRsiXX74carjQT/S5D50JEJA/BUF+Yb7JpnPOVFlkwZplp31BI3CG7BI C3dPcvigg+VWPhWilLi4XR3shc3C3JjZl2hHvVnllA5eyMG2TA8h2xC08XLE+Z53EFX44T5CN BI3GTQ2EcmitqGMWGDWKSWg27vrQEftN2l+lYPqfKbS23qaCY7yDvpDBI9hdxUEZdj5gfLryY BGz5lkNdkIRD25rdJhpnK7YCEFiza1rCHM4aSxUzuRJzvsA9nImGisWn05FxptQo//0Spszij dyUUKbUKcRsc82YVlRgeJ/2pi46DhvuQRGrZidQGwgIn83BYvlhihI2KSvb8sdMAgPAUF55q8 d8rPNMYs+8I8ovDNIrZdb7nvGTEDPzo6QePYGDQs8wcKSJzXJ7QIjPpx8cITM7Hif4v6MRkqV kHk98HVUzsJ/NmgztW9YyHOocLYfxX2v2p43Z3H8cisYjqHqnia2YKuSNbbiQx9NOku9DGasx j5jGX9me2yxLhy7v8r7vwdzrsHzCclFoc42TWgWFIQTdHPcGiHi19RMJ2gkhhD6DX1EQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.13 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:205526 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --w6gJih3C9uu5P6eh8D6owU7V0edb9H9X4 Content-Type: multipart/mixed; boundary="DtHni9p8TtrDWVwPkhfF1clicWEt9viKv" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: emacs-devel@gnu.org Message-ID: <5782C967.8020905@gmail.com> Subject: Re: Use cases for post-redisplay hooks References: <577A9156.9070007@gmail.com> In-Reply-To: <577A9156.9070007@gmail.com> --DtHni9p8TtrDWVwPkhfF1clicWEt9viKv Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-07-04 12:39, Cl=C3=A9ment Pit--Claudel wrote: > Hi emacs-devel, >=20 > As a prelude to implementing the actual functionality, I'd like to get = a clearer picture of what use cases exist for post-redisplay hooks. Summarizing the current discussion: (1) Is still valid, though Richard did suggest that we could have Emacs t= ake the screenshots itself. It would indeed be a useful feature to have, = though it is partly orthogonal, and seems non-trivial to implement. Richa= rd also suggested special casing this feature and implementing only that = instead of a post-display-hook. (2) Does not sound like it would benefit significantly from such a hook (= but I may have missed something). (3) Does not resolve to something concrete. Cl=C3=A9ment. > Here are the ones that I'm currently aware of; can you think of other o= nes? >=20 > 1. (my own) Generating emacs screenshots. You can see a demo at http://= web.mit.edu/cpitcla/www/emacs-screencast-annot.gif (let me know what you = think!). Other hooks do not work because: > - pre-redisplay-functions are called too early > - pre- and post-command-hook do not run often enough (in the screenca= st above, see the butterfly animation, for example) > - window-related hooks do not run often enough either > - redisplay-end-trigger-functions are tricky to use, and deprecated >=20 > 2. (Keith David Bershatsky + Michael Heerdegen @ https://lists.gnu.org/= archive/html/bug-gnu-emacs/2016-01/msg01013.html) Updating overlays after= scrolling. The bug thread is pretty long and subtle, but this issue has= also been discussed on emacs.stackexchanged IIRC. >=20 > 3. (Stefan? @ https://lists.gnu.org/archive/html/emacs-devel/2009-02/ms= g00785.html) Running code every time "something visible" happens (e.g. du= e to process filters) >=20 > For number 1, and potentially number 3, a hook that run after redisplay= completes entirely would work. For number 2, things are less clear. Mich= ael, Keith, and Eli, do you have ideas of when in the display cycle such = a hook should run? >=20 > Thanks! > Cl=C3=A9ment. >=20 >=20 --DtHni9p8TtrDWVwPkhfF1clicWEt9viKv-- --w6gJih3C9uu5P6eh8D6owU7V0edb9H9X4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXgslnAAoJEPqg+cTm90wjGF4P/0ZUwVGJ2OhO6bL/QIsMuKma Hg7FUg24Z26BGb7tmTsXZqJDuBjbHeZCweZovBXy1c8BTJSVvlz13QTwNNYS5NNL c4TQAz2Ka6bSgsSTrO0+s0PQw8nF8Z5cAV258FRF6XEyDp1JRjuG9YShiyTQfTP7 FksseAQXTjEoqD97FLNgE2sj6Axn9awKghfP1BdkcK6ofh/avPl3/4Dz2hKLWepk djP6K7Q9TNSKuR1xom3lhc9TictHiChXTXzlgE+UWopccd5W81ywHqJWyDFG4a8l 9/AilWeNMPyvu+RYLnVnwEJiwO02Ix2Y5zk/o+JZRElCKYjbdwNz/GcsCiYrGIgY FVQ0MX29LYdac3svlM7iIFM4W6Y0FokuibE7bfYbqaow0I4pwYmY68KIvPFYM2y1 krJBxyGJr55eCUoNPiL2VCHN46pJA3OqlaJOGhmWeLZtL6LyqMtWsQ0BKL4sR2gZ X+fkBa4ig5UNFxRfJjeJOLRw+FioV8XT4vznS2xnTcmKPV9mDrRrVp0NEnRGAXEu 44xbfxjdV2hdbBy5aLHOqfVRH6oqCC7D/WbdjtnFjdmCL3UxmheduL5o2yrnOM+Q ty3m1BUqQc40xZ5onX8UdBryYm/mbpR8YgAyc2RtLDtW+4vaWltwwiZsfZkLX1EP OCNUohJkRem6FwuCHHuW =m4dA -----END PGP SIGNATURE----- --w6gJih3C9uu5P6eh8D6owU7V0edb9H9X4--