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: Support for explicitly resetting the idle timer? Date: Sat, 27 Nov 2021 12:54:19 +0200 Message-ID: <83v90dzx5w.fsf@gnu.org> References: <1d3c782b-6e79-8deb-e34d-f53b94f2fd9c@gmail.com> <83bl2610wt.fsf@gnu.org> <835yse0y70.fsf@gnu.org> <83zgppzz5z.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2757"; 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 Sat Nov 27 11:54:56 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 1mqvM7-0000UV-8D for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Nov 2021 11:54:55 +0100 Original-Received: from localhost ([::1]:40150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqvM5-0005Fr-Vs for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Nov 2021 05:54:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqvLR-0004Yn-63 for emacs-devel@gnu.org; Sat, 27 Nov 2021 05:54:13 -0500 Original-Received: from [2001:470:142:3::e] (port=54548 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqvLQ-0001Kp-Te; Sat, 27 Nov 2021 05:54:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8Q7LtMr+hYlyoelRK0SLdY3D7ycXeCxXxb26FLdHcxM=; b=PQvoY4JIS6OK Fa+zNvFbtGdgC259WF2C2rD3mSDljJmreQcQPE9O+AT5NZLBL48brMfA92D1HxyvCPkZqfqYKrNo/ qo2Zm41s9jpQW8e5i0a2so+5Tcu1b81smcBr+M1Yidx35qUW2TMrR5EbH9HNFDZfJq0kCb8KUjbot +VQ5h8RC4zKLT8w1wleh1yHP3TE4XPVi64h6BH9VIL9h5faVIFKKj4qsmkXK2apPk6HFNFIfFQeZw r2+Zpm0vo5OckJWgrtHWxogO72haYqBqrSz7B3utENb4PuSZnS38d2h3ZsFMx7j453FYUPP0Itarh qeevS0OCbG+JALyMAjFWnQ==; Original-Received: from [87.69.77.57] (port=1142 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 1mqvLP-0001Wf-F5; Sat, 27 Nov 2021 05:54:11 -0500 In-Reply-To: (message from Campbell Barton on Sat, 27 Nov 2021 21:21:29 +1100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:280321 Archived-At: > From: Campbell Barton > Date: Sat, 27 Nov 2021 21:21:29 +1100 > Cc: Emacs developers > > > > > Which code invokes set-window-vscroll, and what triggers that code? > > > > > > There is a while loop that uses (read-event) inside a `(track-mouse > > > ...)` block that changes the scroll location and redraws. > > > > But that while loop is invoked by some binding of some mouse gesture, > > no? That binding _is_ the "command" I meant. > > Ah, right. There is an interactive function bound to a key which runs > track-mouse ... etc. So now I wonder how come the idle timers run for you. Perhaps the command you mention activates track-mouse and exits? > Arguments could be made against this: > > - This could break existing packages that use long running commands > and expect the idle timer to run. While a command's code runs, idle timers cannot run, because timers only run when Emacs is in its idle loop, waiting for some input. Emacs only gets to the idle loop after a command exits and there's no further input waiting for processing.