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: Advicing select-windows, shr rendering, and per-buffer-theme package Date: Fri, 18 Mar 2016 09:40:00 -0400 Message-ID: <56EC0530.1050503@gmail.com> References: <87wpp0xd1t.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xxMrNqriaG5H2NfcSNdEEETmnwXG1HCHc" X-Trace: ger.gmane.org 1458308427 1848 80.91.229.3 (18 Mar 2016 13:40:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Mar 2016 13:40:27 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 18 14:40:14 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 1agudR-0004mk-KY for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2016 14:40:13 +0100 Original-Received: from localhost ([::1]:43760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agudR-0001mh-5L for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2016 09:40:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agudN-0001jC-F3 for emacs-devel@gnu.org; Fri, 18 Mar 2016 09:40:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agudI-0002Nm-FQ for emacs-devel@gnu.org; Fri, 18 Mar 2016 09:40:09 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.10]:64725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agudI-0002Ne-5u for emacs-devel@gnu.org; Fri, 18 Mar 2016 09:40:04 -0400 Original-Received: from [18.189.75.34] ([18.189.75.34]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0MUClm-1aHAZN0Nvu-00R4ce for ; Fri, 18 Mar 2016 14:40:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <87wpp0xd1t.fsf@gmail.com> X-Provags-ID: V03:K0:7grQhR4VoNZ7ZaUUxVkDH/0Jp3OpQPg09oISKeUuuafgtvTTttj BeS+vSXl+6OKNtrvy/gHGtQ+Xl6Gvf8n8sJv+pIMV9RRGllWdXovMJol6IJ6XszOIU/ra7I menlsjrZASfxN5cDMO62x28KxabVrrTyrXWiS2SZMTe66UJgq3Eo6MHBQA2svboiNdXNB1j SQTWn9swqWiI0k+IQsD/g== X-UI-Out-Filterresults: notjunk:1;V01:K0:Q4xbuDcyvE4=:XMVxUu1kZzC7X342kg2RTR JCZmOTsRgmoK+UG2URPV5SIP/bt6Isc3svlAGQTCacUca2AGa3SX7K5QX33fNfizbtpMwQ/Kz /QRrSg6pHfT6aRJwujg5PgSFleEFAYwOhY5obZ+1cTwkfK0IUPIr1+tH1mrt1VrTSu3uF6xzv Pl63/iHx9H7a4ZHxIxPn6CsbiqEY87noM6Z8rm3of6sjLveHXNok6uI84cU7hJ20UFCiEJgWQ /W5QeX4A16WkaEm2E4SXX+tti1LY1Pql/X7lbW4LzLD16lzFdcCr/ITh0cL5K6JxH/HZU0R88 SsLyikhJ49NLJ6q2RJgRT6ADcUoJJBZpEVj91/iVzBxEDdjO6H/FYpXVjmBC8O9quGLGgSIPS 5QVIh+V7J/6REuXk4ySpgqoyHEUldYWYwiULrv7jjUZy0nJraWEsfuN2CYFi30rOj4tTxQl2c Jz9Vitx93+O07S9IKmienYntAIDwvZC+B7qJbb3/w2P1hWQlfOOiDFN7g2u5LMarIWaudWboi kvDfHUHUYTaqE4fUVJ4aQvxszc9Wyx1BnR0ADp38ur2cdStSjQwBhij7zJcPKvRdq6aDZ80Sj AWeC9ixRnH0flM3iRioLKJaE+cdjw0AnOxL+CnxuiCjGOG/4wITQvs7/wjnwIociatWiKjBiB jdQZk2/wWUcheXU1QbBVm/Q5O9FQzYDf68whllnlxgrdpwpltaQrTU07v35PHIyQz0hY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:201824 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xxMrNqriaG5H2NfcSNdEEETmnwXG1HCHc Content-Type: multipart/mixed; boundary="nf3klXqnj0LmFR82KL9J75OvhlWFDV1Us" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: emacs-devel@gnu.org Message-ID: <56EC0530.1050503@gmail.com> Subject: Re: Advicing select-windows, shr rendering, and per-buffer-theme package References: <87wpp0xd1t.fsf@gmail.com> In-Reply-To: <87wpp0xd1t.fsf@gmail.com> --nf3klXqnj0LmFR82KL9J75OvhlWFDV1Us Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Another idea; do you need to change the theme per buffer, or per buffer d= isplayed in a window? If the latter, then you could ensure that buffer th= emes are only changed if a buffer is actually shown on screen. On 03/18/2016 07:04 AM, I=C3=B1igo Serna wrote: > Hi, >=20 > I'm the author of =E2=80=9Cper-buffer-theme=E2=80=9D, a simple package = available in > MELPA [1], which changes emacs theme when switching to a buffer accordi= ng to > some configured rules (f.e. use a dark theme when coding, light theme > for email or web navigation). It advices `select-window', checks buffer= > name or major-mode, and changes theme. >=20 > It worked correctly and fast with emacs 24.5, but now with emacs 25.x i= t > produces additional =E2=80=9Cflickering=E2=80=9D when switching buffers= , especially for > eww/shr buffers, where it makes package useless. >=20 > I think problem comes that, when switching to a eww/shr buffer, shr > rendering uses many temporal buffers, so theme changes many times > producing that "flickering" effect. But I'm not sure as my elisp skills= > and emacs internals knowledge is quite limited. >=20 > I don't know how to solve it=E2=80=A6 I've tested with before/after var= iations > to `advice-add' but results are similar. First versions used > `window-configuration-change-hook' but add-advice to select-window was > much better option then. Any ideas? >=20 > Thanks in advance, > I=C3=B1igo Serna >=20 > [1] http://melpa.org/#/per-buffer-theme > https://bitbucket.org/inigoserna/per-buffer-theme.el >=20 >=20 --nf3klXqnj0LmFR82KL9J75OvhlWFDV1Us-- --xxMrNqriaG5H2NfcSNdEEETmnwXG1HCHc 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) iQIcBAEBAgAGBQJW7AUwAAoJEPqg+cTm90wjg2UP/3QJ7pt/yORiAeHHSPIXqbk3 w11da7V0q5oXZzHM6wV17/4pJzVGNTF4SNvhkhkOfXdJnZdTAyJ1BAZzd6CaBWGE CXsufNseh8KM53BU2HgyCyPcAyIedcAfCS59YrH+yXGDexMuuJliIWg53se5gmhO /OKEVBlzgMMN/gKzT4rGyjb3l2f9gRzvjFriZ7fg7PpLwbJvNYe6jh6IdDWqbO78 h6CagRkk2ZcbiC98ibmVQFsHpqwoSej9N01auUvJd74wDR4vzKme61g4F1aZ5/pO eo1sGAFlYxfDQanJHQ2r8poYXyLPl1Y5QA//WJ/yNjQy6AvcAt+/m0CvcOvaKyaK vgrEao1SJVUma2Uv+Lxd4ctmz6yNvFk3wqJBao3Z2iljesWnP5yWyCKZGyrfcAIr GlCytK+r1jZLCbs2HOJ7Ctko4XtzS2KNKRO9JfNuuSCoPjiJTMwP72MRK4Oya52u X+zICyx3w41XPPPvzL8XTKuDPRCuTsZBDQJRfPNazZ6e3lIsIPalT2PmPq3eH+IX DraWHOkVA8XWMDDKwOzuNhe3iiMpLxcieKzMsZgOlqHbOVm8ut/48a2kj21GgeTD vkEC3i1klpjC0DSyoo3tmbx8+/liYRfNvYoMDcqTFNRT4u1SiKupSVO1OJX5HIYu sZMS2ibfTxLbdyaibl/P =Oqws -----END PGP SIGNATURE----- --xxMrNqriaG5H2NfcSNdEEETmnwXG1HCHc--