[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HowTo: Run a hook when a buffer becomes "current"
From: |
John Wiegley |
Subject: |
Re: HowTo: Run a hook when a buffer becomes "current" |
Date: |
Tue, 22 Dec 2015 09:47:36 -0800 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) |
>>>>> raman <address@hidden> writes:
> I'm implementing myself something I'm calling "SoundScapes" --I'm building
> it within Emacspeak but it may well be useful more generally.
I really like the idea of soundscapes, Raman.
As a first approximation -- that is, before requiring a new hook to try out
the utility of your idea -- I'd recommend using a timer that checks the buffer
of the currently selected window is.
I doubt it's even desirable to change the music instantly whenever the buffer
changes; in some cases, that could become quite jarring. A timer not only
solves your problem quite simply, but allows for customization opportunities
like "cross-fading" after you know that the user has been in the new buffer
for X milliseconds. This would prevent quick Org capture buffers from
disrupting the music of my Gnus summary buffer, for example.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
- Re: HowTo: Run a hook when a buffer becomes "current", (continued)
- Re: HowTo: Run a hook when a buffer becomes "current", Richard Stallman, 2015/12/16
- Re: HowTo: Run a hook when a buffer becomes "current", raman, 2015/12/17
- Re: HowTo: Run a hook when a buffer becomes "current", Richard Stallman, 2015/12/18
- Re: HowTo: Run a hook when a buffer becomes "current", raman, 2015/12/19
- Re: HowTo: Run a hook when a buffer becomes "current", Dmitry Gutov, 2015/12/19
- Re: HowTo: Run a hook when a buffer becomes "current", raman, 2015/12/19
- Re: HowTo: Run a hook when a buffer becomes "current",
John Wiegley <=
- Re: HowTo: Run a hook when a buffer becomes "current", raman, 2015/12/22
Re: HowTo: Run a hook when a buffer becomes "current", Karl Fogel, 2015/12/17
- Re: HowTo: Run a hook when a buffer becomes "current", raman, 2015/12/17
- Re: HowTo: Run a hook when a buffer becomes "current", Marcin Borkowski, 2015/12/18
- Re: HowTo: Run a hook when a buffer becomes "current", raman, 2015/12/18
- Re: HowTo: Run a hook when a buffer becomes "current", David Kastrup, 2015/12/18
- Re: HowTo: Run a hook when a buffer becomes "current", Marcin Borkowski, 2015/12/18
- Re: HowTo: Run a hook when a buffer becomes "current", T.V Raman, 2015/12/18
- RE: HowTo: Run a hook when a buffer becomes "current", Drew Adams, 2015/12/18