From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: raman Newsgroups: gmane.emacs.devel Subject: Re: HowTo: Run a hook when a buffer becomes "current" Date: Tue, 22 Dec 2015 10:19:21 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1450808377 12016 80.91.229.3 (22 Dec 2015 18:19:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Dec 2015 18:19:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 22 19:19:32 2015 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 1aBRX2-0002jg-6w for ged-emacs-devel@m.gmane.org; Tue, 22 Dec 2015 19:19:32 +0100 Original-Received: from localhost ([::1]:52433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBRX1-0003pv-He for ged-emacs-devel@m.gmane.org; Tue, 22 Dec 2015 13:19:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBRWy-0003pb-03 for emacs-devel@gnu.org; Tue, 22 Dec 2015 13:19:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBRWu-0005jh-QO for emacs-devel@gnu.org; Tue, 22 Dec 2015 13:19:27 -0500 Original-Received: from mail-pf0-x234.google.com ([2607:f8b0:400e:c00::234]:33956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBRWu-0005ja-K1 for emacs-devel@gnu.org; Tue, 22 Dec 2015 13:19:24 -0500 Original-Received: by mail-pf0-x234.google.com with SMTP id u7so63512496pfb.1 for ; Tue, 22 Dec 2015 10:19:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=2Zue0TFv4+86IGcecxPcGw+9jtlBcGR/U16pPI8Agcc=; b=CtyG0xuf77xsLWsQLhDFTWLTUpNPuPP8NdXoyKPhAFLrwnLIAbfXxL0li3JnwcVfJG I5RAYoFJ3S4fHiBJAr+kcgd3x5ZsBRN/1sTBx5N0L7VTxuMuKJP8N9MH8lR+yEB4SMdi b5U4FXWxM6Dk/1S3JDV22+4bFgQlENdSChfdLALDQKxqe8d3NvAjjUf3PQMB4NdJH3FY UHwfMQU0XeLD3jrKNpNJxM/+pAStrDohkut7d0jrKU71VcPaSOhotePv/DJFH6vJKtzK dmfdi7mSxhflR53em17Zf91VFqyjiJflmu3Z9f5caJ/GvRCuyLrmUamPGzWf/fxqUFiL ES8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=2Zue0TFv4+86IGcecxPcGw+9jtlBcGR/U16pPI8Agcc=; b=lDhJaDi7Gx2nHfaIBt17EuSV8pWSvF3yfNL7UtMFDzADCKMEuxmkZHBJvRApNEc+NP vFX7ZNmOYYJZA/i5IUSutPdpzCw+/BdIQG2xHAEEPwFsGhiYLEr++xShj5Dc8A/X+KRh 1/7ZSwvyVrhuQEjG7M940R+pxbsvnvVPfLWRSGsNPVfQ1dNHc34omB06K4jo/wsbfI8u Iq5yHA9A0sgrlpVxoxhZRB8Mvcrc8RO2CGKpCjrVbtaszdXhiTLOXAci+ShN5vrC41Bf +N6zXlFKnhJFsgg9Zv6n9DPNZkDni1DIu/mewbdHMPaxqXzEXj8bq3MUAZtUvLzKXw8H E8eA== X-Gm-Message-State: ALoCoQlIhj7Ui3pWKFj/iNVkgC+J2nCUduSJ27tAXTwYTqwIGaC5buP09Lp33KsJC6ux/089Uc0g/2u4cvcDLDPqZPW240zjBA== X-Received: by 10.98.87.7 with SMTP id l7mr37433504pfb.124.1450808363701; Tue, 22 Dec 2015 10:19:23 -0800 (PST) Original-Received: from raman-glaptop2 (c-73-170-121-60.hsd1.ca.comcast.net. [73.170.121.60]) by smtp.gmail.com with ESMTPSA id q66sm36022224pfi.13.2015.12.22.10.19.22 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 22 Dec 2015 10:19:22 -0800 (PST) In-Reply-To: (John Wiegley's message of "Tue, 22 Dec 2015 09:47:36 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::234 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:196682 Archived-At: John, thanks for the reply:-) For now I've implemented it with an advice on select-window --- and am working on the Soundscapes themselves. When I've made more progress, I'll write up what I learn re Emacs' facilities for doing something like this -- email discussions tend to drift after a while. What I've learnt so far: 1. hook buffer-list-update-hook doesn't match its documentation -- 2. select-window doc-string recommends the above hook and likely needs to be updated Re fading in and out rather than abruptly switching: My first "get it working" idea killed and started new processes when switching. Next I tried stop-process which turns out be disfunctional on Linux -- so I'm now writing myself a more sophisticated Boodler Agent that handles the fade-in/fade-out. Anyway it's proving a fun holiday hack:-) --