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: Redisplay hook Date: Mon, 4 Jul 2016 12:14:02 -0400 Message-ID: <577A8B4A.5060709@gmail.com> References: <577814F4.8060500@gmail.com> <8360sns8nj.fsf@gnu.org> <57789637.8020204@gmail.com> <83twg7qi5t.fsf@gnu.org> <5779A83D.6020201@gmail.com> <83twg6p1kd.fsf@gnu.org> <5779E692.5010501@gmail.com> <83k2h1piig.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eoXQmlCo6hrFQp1ublNLE5opb6xW2478H" X-Trace: ger.gmane.org 1467648924 23440 80.91.229.3 (4 Jul 2016 16:15:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2016 16:15:24 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 04 18:15:15 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 1bK6We-0007zF-77 for ged-emacs-devel@m.gmane.org; Mon, 04 Jul 2016 18:15:12 +0200 Original-Received: from localhost ([::1]:49010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK6Wd-000097-BA for ged-emacs-devel@m.gmane.org; Mon, 04 Jul 2016 12:15:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK6Vl-00006R-BY for emacs-devel@gnu.org; Mon, 04 Jul 2016 12:14:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bK6Vj-0003Uj-0d for emacs-devel@gnu.org; Mon, 04 Jul 2016 12:14:16 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.13]:56993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK6Vc-0003Sd-22; Mon, 04 Jul 2016 12:14:08 -0400 Original-Received: from [18.189.1.110] ([18.189.1.110]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0MEVKb-1b51QT459N-00FgUP; Mon, 04 Jul 2016 18:14:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 In-Reply-To: <83k2h1piig.fsf@gnu.org> X-Provags-ID: V03:K0:/bJJJaXpo/iold3DTSPWfFau/0p+hhTR6R316EczqoYYdJMnveh WRsJpLmHXszYq24dOk0fAu7PUWqh+TntEKzXAHhQs9hRIm5Mc3rjB3WL90qmrNSdu2ein0H i6H0qxyJ03OX0MCHXZztLcbMZENgE90yT0wN5jOlTTQ5NDOvLExvPAJk1NtyVpRnq7nn6nC fTfkMsfYrOZr0+1af9UNg== X-UI-Out-Filterresults: notjunk:1;V01:K0:ce4mObe1P+A=:/rZDltsLyKc97nqGm3we29 TT7KSbp2TkVwctNwL0pQBdnvKfuSWFLKUJT5zQTKo32aI5bPm5Jqp59QK5MXqNrFG6IvHXO8m AeqT/1nze6hYXKK1OHgaUCmfnO62zwXqzgP/YX6jG//Lf9676CETnAiNSfd/xZ7rK6KfwiBId RA6aHWzUpHtwVdiu2htVYXqDGp3K1dDb5v/Xt+3PshP24EFHa7Zx8EygkFetHwxG92bSU5D/o U+F5mB0eQmOuxsz9o8EqYd3DnwTaI3UdGIv5Y6eRv89IzNylolpQlDDHTfr5P7Y0VeDGvIcXu BVUmoX1hiBkp0EPZsrqcXoVmL3MvK6/O6jsq2kIu+n+0boc10eGMqufbEpOuHXzwH352zsbSo C5xNGKfYwvm+pxIoIzTvUIJ+9z5vz0DTcrIiZSeSay5YbafzJhWMmowvG0SPo9gLQFTIwZ7B5 d6dEDa+qPO0WxxsCjrJEkHZqP3832D343fqQo+ffDf0SKnSxEp1VK0L6KdA/Kya+oiLeeaoJ1 BxqAo10rYUNC36XvSPafg4guIBcGwVPCc6+BR82w6re4xLAI/oJ/8XAimZ1F0eRLPL9jl1wit hppJlEGreWayA0H5Qtq1L/EcXHsQCbDeMChpZqdGsQgxEJM9oZY0Nsu1i6GCefPJggZ54eE1p hXNMWI3vlI/YK17WNqgBZFbhl/bSd6uLv83aIhFqjIXk3yh3ZxygetPZdKRjP9/oQ7tg= 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:205138 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eoXQmlCo6hrFQp1ublNLE5opb6xW2478H Content-Type: multipart/mixed; boundary="L5nfPe0fqaCvOIX8QSNRHGuHXjK4o6vd2" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: Eli Zaretskii Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Message-ID: <577A8B4A.5060709@gmail.com> Subject: Re: Redisplay hook References: <577814F4.8060500@gmail.com> <8360sns8nj.fsf@gnu.org> <57789637.8020204@gmail.com> <83twg7qi5t.fsf@gnu.org> <5779A83D.6020201@gmail.com> <83twg6p1kd.fsf@gnu.org> <5779E692.5010501@gmail.com> <83k2h1piig.fsf@gnu.org> In-Reply-To: <83k2h1piig.fsf@gnu.org> --L5nfPe0fqaCvOIX8QSNRHGuHXjK4o6vd2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-07-04 10:47, Eli Zaretskii wrote: > redisplay-end-trigger functions are not exactly what you need in this > context anyway (...) Agreed; thanks for the details > The main problem is that "end of redisplay" is not well defined, and > can have quite different meanings for different use cases. That's > because each redisplay cycle includes 2 distinct phases. In the first > phase, the display engine builds data structures, called "desired > glyph matrices", which describe how the changed parts of the display > should look. In the second phase, it actually updates the screen by > comparing the desired glyph matrices with the current glyph matrices > (the latter describe how the screen looks now), and writing to the > glass in the portions where the 2 sets of matrices differ. Thanks for taking the time to explain all of this. > Some use cases want to run the hook after the first phase, some (like > yours) after the second. Moreover, redisplay can sometimes be > preempted half-way through (e.g., if some input arrives), in which > case it aborts the current cycle and doesn't update the screen. For > some use cases, this means redisplay never happened, for others it did > (because some of the display code was run, and the corresponding side > effects happened, e.g., the fontification functions were called). On > top of that, some legitimate use cases may wish to be able to abort > the redisplay cycle under some conditions. Finally, the 2nd phase of > redisplay on GUI frames works by updating each window of the frame's > window tree separately, whereas text-mode frames are updated by first > building the frame-level desired glyph matrix, and then updating the > frame as a whole. So hooks which are interested in only some windows > (e.g., the selected window) should be invoked differently for > different frame types. Ok. This is pretty involved :) > The upshot of all this is that IMO if we decide to provide the > post-redisplay hook, we will need to figure out all of these use > cases, and perhaps provide separate hooks for some of them; otherwise, > I'm quite sure that soon enough someone files a bug report or posts a > message here complaining that the existing hooks don't work for > them... Yes, that makes a lot of sense. On the other hand, we don't need to impl= ement all of this at once. As long as we're fairly sure that we understa= nd the use cases well, we might be able to implement the parts that there= is immediate demand for, leaving room for future extensions as needed.=20 > Volunteers are welcome, as always. Perhaps a useful first step would > be to collect the relevant use cases, filter out the non-relevant > ones, and then to classify the rest in some useful manner. Ok. I'll start a new thread for this. Cl=C3=A9ment. --L5nfPe0fqaCvOIX8QSNRHGuHXjK4o6vd2-- --eoXQmlCo6hrFQp1ublNLE5opb6xW2478H 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) iQIcBAEBAgAGBQJXeotKAAoJEPqg+cTm90wjdYYP/0n9VJXhiDtB/hhNM2JswKqj boRZFbCibZvqGsk8D4nTTB1206qXcXo6QHteySUBkgiWFdiHtR4ortSUnwvkaQ/+ H/7WkCPgOg16phC/TX0+GnLAVn8DTYq1CwKjMJDW83kmR4nGVTz4BH0/zDcFNaEd vq3N8OzhXdir49twnW3zPTQ1SddjDSfScAsXk18yWypZJuegbn0k6uCL+BK2bGK8 z/7q2AK6rJRN0O/JOSzB1YYxDQdoamPOYZ5+bx08PrWhIheac+kvlKYPqInNYfsQ k+/nr7XqqSBvDZekL2PweN6qi1COyYUpFCnRLUiDJ8m2VPmcXhhZ0zskZGDpY2L8 49CXJ/LS4OdL/rhuhO4POT4oz59OTlOHhH8XdtM5QPZxomojj7NyLwgN5lNGrNk5 oVDFQNKt8q/LjgbhtR5infkrFXwpEMou+9Px+1/U9zVB0YkZPUtX5cZPk/oUnP3u jADBDFX7ZGTVqThUpV0QBUFMjiPs+HcZy1//q8mhOUiJ5X7NrAvebVUZOxLzUQZV Z7p6MBWwS3TQFIUmjeDbCF3nQRFjCtYk71e2vH26xihawcz3fd46Yu6g2AvMkFKB 1eVvo2ZzeNzb0JWOAuFufooONHLwMcSBDRfzzOaQwbLsTqeay2Lzv3eij+39YxVI LebhStlk/p/UJHDytvSd =Fqrw -----END PGP SIGNATURE----- --eoXQmlCo6hrFQp1ublNLE5opb6xW2478H--