From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Possible support for buffer local idle timers? Date: Tue, 21 Sep 2021 13:43:59 +0300 Message-ID: <838rzqyzrk.fsf@gnu.org> References: <83fstz1cyj.fsf@gnu.org> <83ee9j1b7z.fsf@gnu.org> <45045c06-9595-e106-890f-74a25c945876@gmail.com> <834kae1mya.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5392"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Campbell Barton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 21 12:46:57 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSdIf-0001Be-Ss for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Sep 2021 12:46:57 +0200 Original-Received: from localhost ([::1]:56454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSdIe-0000h3-GN for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Sep 2021 06:46:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSdFu-00071D-Pw for emacs-devel@gnu.org; Tue, 21 Sep 2021 06:44:07 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45338) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSdFu-00053f-IM; Tue, 21 Sep 2021 06:44:06 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3933 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSdFr-0002ed-SW; Tue, 21 Sep 2021 06:44:05 -0400 In-Reply-To: (message from Campbell Barton on Tue, 21 Sep 2021 20:19:44 +1000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275218 Archived-At: > From: Campbell Barton > Date: Tue, 21 Sep 2021 20:19:44 +1000 > Cc: emacs-devel@gnu.org > > On Tue, Sep 21, 2021 at 4:07 PM Eli Zaretskii wrote: > > > > > Date: Tue, 21 Sep 2021 10:36:05 +1000 > > > From: Campbell Barton > > > > > > > . does the timer start measuring idle time only when the buffer is > > > > the current buffer, or regardless of that? > > > > > > would just go with default behavior of global idle timers since a user > > > switching buffers will typically reset idle timers. > > > > What do you mean by "reset timers" here? > > I assume that the the act of switching the buffer will cause Emacs not > to be idle, so after switching buffers idle timers will begin to run > again as their deadlines are met. No, that is not necessarily true. "Idle" means there's no input for Emacs to process, but it doesn't mean Emacs is not doing anything. It could run some timer-related code which switches buffers, for example.