[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible support for buffer local idle timers?
From: |
Lars Ingebrigtsen |
Subject: |
Re: Possible support for buffer local idle timers? |
Date: |
Tue, 21 Sep 2021 08:16:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
> I don't understand what you mean by "acting on a buffer". The timer
> function can do anything it wants in any buffer.
It is common to tie timers to buffers, though. A common pattern in
timer functions is
(lambda ()
(if (not (get-buffer buffer))
(cancel-timer timer)
(do-our-stuff...)))
and for idle timers
(lambda ()
(when (eq (current-buffer) buffer)
(do-our-stuff...)))
I think what's requested is just some syntactic sugar for these two
things.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- Possible support for buffer local idle timers?, Campbell Barton, 2021/09/20
- Re: Possible support for buffer local idle timers?, Eli Zaretskii, 2021/09/20
- Re: Possible support for buffer local idle timers?, Campbell Barton, 2021/09/20
- Re: Possible support for buffer local idle timers?, Eli Zaretskii, 2021/09/20
- Re: Possible support for buffer local idle timers?, Campbell Barton, 2021/09/20
- Re: Possible support for buffer local idle timers?, Eli Zaretskii, 2021/09/21
- Re: Possible support for buffer local idle timers?,
Lars Ingebrigtsen <=
- Re: Possible support for buffer local idle timers?, Campbell Barton, 2021/09/21
- Re: Possible support for buffer local idle timers?, Eli Zaretskii, 2021/09/21
- Re: Possible support for buffer local idle timers?, Campbell Barton, 2021/09/25