help-gnu-emacs
[Top][All Lists]
Advanced

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

[SOLVED] Re: Why run-with-timer generates so many timers?


From: address@hidden
Subject: [SOLVED] Re: Why run-with-timer generates so many timers?
Date: Sat, 18 Jul 2020 13:54:13 +0800

Thanks for your help, problem solved.

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


On Sat, Jul 18, 2020 at 10:07 AM Michael Heerdegen <michael_heerdegen@web.de>
wrote:

> "numbchild@gmail.com" <numbchild@gmail.com> writes:
>
> > Here is the code lines which running timer:
> >
> https://github.com/stardiviner/emacs-rainbow-fart/blob/master/rainbow-fart.el#L245
>
> Looks like you save the timer in a global variable; but your mode is
> buffer local.  In your implementation, enabling in any buffer starts a
> new timer unconditionally and overwrites the global variable AUAIU.
> Dunno whether this is the reason for all of the timers you see.
>
> The question if you should use only one global timer for all buffers is
> not trivial; if you can do that, it is preferable.  Depends on things
> like which buffers should be treated (all?, all visible?, only the
> current buffer?).  Haven't looked at your code that much.
>
> Michael.
>
>
>


reply via email to

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