From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Advicing select-windows, shr rendering, and per-buffer-theme package Date: Fri, 18 Mar 2016 11:21:18 -0400 Message-ID: References: <87wpp0xd1t.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458314504 10337 80.91.229.3 (18 Mar 2016 15:21:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Mar 2016 15:21:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 18 16:21:37 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 1agwDX-0005I1-3R for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2016 16:21:35 +0100 Original-Received: from localhost ([::1]:44372 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agwDW-0003SA-3C for ged-emacs-devel@m.gmane.org; Fri, 18 Mar 2016 11:21:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agwDS-0003PX-8Y for emacs-devel@gnu.org; Fri, 18 Mar 2016 11:21:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agwDP-00021O-09 for emacs-devel@gnu.org; Fri, 18 Mar 2016 11:21:30 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:47982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agwDO-000214-PO for emacs-devel@gnu.org; Fri, 18 Mar 2016 11:21:26 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1agwDM-0005Bz-0m for emacs-devel@gnu.org; Fri, 18 Mar 2016 16:21:24 +0100 Original-Received: from 107-179-144-20.cpe.teksavvy.com ([107.179.144.20]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Mar 2016 16:21:24 +0100 Original-Received: from monnier by 107-179-144-20.cpe.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Mar 2016 16:21:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 17 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 107-179-144-20.cpe.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:M7gfRlOo0tMWkBs5zTAuFTkOnZ8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:201827 Archived-At: > See thread I had on this list re hooking sound themes based on current > mode -- I ran into this issue as well. As far as I know, it's more than > just shr/eww that triggers this: if you look, select-window gets called > way more often than you'd expect. Indeed, `current-buffer' and `selected-window' don't correspond really to the user's perception, because they can be changed temporarily without the user even noticing (and it's not just a theoretical possibility but is something that happens often enough). > After suggestions from folks like John, I ended up implementing my > solution via an idle timer, you can see the relevant code here: Sounds like a better option, indeed. Stefan