From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Campbell Barton Newsgroups: gmane.emacs.devel Subject: Re: Support for explicitly resetting the idle timer? Date: Sat, 27 Nov 2021 22:16:10 +1100 Message-ID: References: <1d3c782b-6e79-8deb-e34d-f53b94f2fd9c@gmail.com> <83bl2610wt.fsf@gnu.org> <835yse0y70.fsf@gnu.org> <83zgppzz5z.fsf@gnu.org> <83v90dzx5w.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23053"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 27 12:17:01 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 1mqvhV-0005nU-Gg for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Nov 2021 12:17:01 +0100 Original-Received: from localhost ([::1]:51960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqvhU-0006Ro-5f for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Nov 2021 06:17:00 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqvgz-0005ln-15 for emacs-devel@gnu.org; Sat, 27 Nov 2021 06:16:29 -0500 Original-Received: from [2607:f8b0:4864:20::102a] (port=51126 helo=mail-pj1-x102a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mqvgt-0004CI-I5; Sat, 27 Nov 2021 06:16:28 -0500 Original-Received: by mail-pj1-x102a.google.com with SMTP id x7so8877857pjn.0; Sat, 27 Nov 2021 03:16:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gZ01tJbiNPo8Kq2lXUUcDANUqo/pNt5t4ujkSVu2NV4=; b=Jn+8OM0YkgfTN6wMIlg+AQLrK8Hi+r7bdx50vvy+iY35/qV17FIGap1YSLAfsfYo79 kbnmZFBKPbtopYRmY7vbPBC2tBBUw4LvKU6kAc1LC9/g40Ta1nbGIhKfEzGS9wDXB+tG qD2chlEBcoNtZnkWkMsmpRIYVpk09iOp7tnTPmAiiacWUaHkKu+ymhTdp71Ov3Gfug1C CDxEYk8946rUSmbGolbvPXwhjuMbKIpPOxO8ClDTgrfrU/oWeW+2B+XpOa1EOaG5DaPw 4NwyTtp3JARnPlZtDzBMwF1yoyRaMIBwDmeehOG/fJgiKCojjirVvT/HjPWZFriA7GX6 92Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gZ01tJbiNPo8Kq2lXUUcDANUqo/pNt5t4ujkSVu2NV4=; b=3vOsGOmcNwmW0D/2JaSerr3yS5ebNzkjRoey/OVT0I2i+F1OHxiuGAx9pw2uKrgXDU sCC0Oq5/n8tvDk7/MiCV437Tm+2y/tHlrrIUuekVtgMYl6JSgcosweMFKGOhr9ISFZiX kkJj3McsuAn8cAbQbLlbES+2ysMCApp8btgCs7ZbeG5QuXThOcqngCthXewaCLCkywcs itUqkF+C/wkG2jdrYVKJuFnAYRISyxMqvy68ca6bDwwxiACpQzNBLxlkRgW3BOKFtZz4 NulDqgyfbuhYOtgtIFYMpj9s3n1sauwSP6HdC8P0FoKDDk2/oMLMvdn560xA0Bh1QEBF xuiQ== X-Gm-Message-State: AOAM531Po+IBONW+k4fO/FVVXfFeRiDAzf9rFeohBExdX0LIJRwA2uM7 1ZWJqij1/dswetM1LdpkmYgOkc9qD3hhWAyXqu4wyAQ1ziY= X-Google-Smtp-Source: ABdhPJxxrafO21mtsDlvbmEb000A8kDEq4A/etYDiKMYfNHZeJIjgpsGdeAg6sxwQjYOs21Q3g24sEIjexRb5JIDs3k= X-Received: by 2002:a17:902:e0d4:b0:142:8897:94e2 with SMTP id e20-20020a170902e0d400b00142889794e2mr45297693pla.58.1638011781555; Sat, 27 Nov 2021 03:16:21 -0800 (PST) In-Reply-To: <83v90dzx5w.fsf@gnu.org> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::102a (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=ideasman42@gmail.com; helo=mail-pj1-x102a.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:280326 Archived-At: On Sat, Nov 27, 2021 at 9:54 PM Eli Zaretskii wrote: > > > 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? It also seems strange to me, but it's not exiting - it runs track-mouse and calls read-event & redisplay, just double checked - idle timers are definitely running inside the track-mouse block (which is within the command). > > 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. It's possible there is something more specific to my package than I realized (although I'm not sure what as it's basically re-displaying in a loop). -- - Campbell