all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Clément Pit--Claudel" <clement.pit@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Advicing select-windows, shr rendering, and per-buffer-theme package
Date: Fri, 18 Mar 2016 09:40:00 -0400	[thread overview]
Message-ID: <56EC0530.1050503@gmail.com> (raw)
In-Reply-To: <87wpp0xd1t.fsf@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1510 bytes --]

Another idea; do you need to change the theme per buffer, or per buffer displayed in a window? If the latter, then you could ensure that buffer themes are only changed if a buffer is actually shown on screen.

On 03/18/2016 07:04 AM, Iñigo Serna wrote:
> Hi,
> 
> I'm the author of “per-buffer-theme”, a simple package available in
> MELPA [1], which changes emacs theme when switching to a buffer according 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.
> 
> It worked correctly and fast with emacs 24.5, but now with emacs 25.x it
> produces additional “flickering” when switching buffers, especially for
> eww/shr buffers, where it makes package useless.
> 
> 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.
> 
> I don't know how to solve it… I've tested with before/after variations
> 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?
> 
> Thanks in advance,
> Iñigo Serna
> 
> [1] http://melpa.org/#/per-buffer-theme
>     https://bitbucket.org/inigoserna/per-buffer-theme.el
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2016-03-18 13:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18 11:04 Advicing select-windows, shr rendering, and per-buffer-theme package Iñigo Serna
2016-03-18 13:38 ` Clément Pit--Claudel
2016-03-18 13:40 ` Clément Pit--Claudel [this message]
2016-03-18 16:45   ` Iñigo Serna
2016-03-18 17:45     ` Clément Pit--Claudel
2016-03-18 20:17       ` Iñigo Serna
2016-03-18 22:07         ` raman
2016-03-18 13:55 ` raman
2016-03-18 15:21   ` Stefan Monnier
2016-03-18 16:28     ` raman
2016-03-18 16:47       ` Stefan Monnier
2016-03-18 22:13       ` Iñigo Serna
2016-03-18 22:48         ` raman
2016-03-18 17:04     ` Iñigo Serna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56EC0530.1050503@gmail.com \
    --to=clement.pit@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.