[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advicing select-windows, shr rendering, and per-buffer-theme package

From: Clément Pit--Claudel
Subject: Re: Advicing select-windows, shr rendering, and per-buffer-theme package
Date: Fri, 18 Mar 2016 09:40:00 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

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: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]