From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 04 12:38:13 2025 Received: (at submit) by debbugs.gnu.org; 4 Jan 2025 17:38:14 +0000 Received: from localhost ([127.0.0.1]:57113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tU86H-0003pD-Cq for submit@debbugs.gnu.org; Sat, 04 Jan 2025 12:38:13 -0500 Received: from lists.gnu.org ([2001:470:142::17]:52232) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tU86E-0003oy-LN for submit@debbugs.gnu.org; Sat, 04 Jan 2025 12:38:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tU868-0003s5-RL for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 12:38:04 -0500 Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tU866-0004OO-UW for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 12:38:04 -0500 Received: from localhost ([::ffff:41.75.173.43]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001BF35.00000000677971D8.0015F8DE; Sat, 04 Jan 2025 10:37:27 -0700 From: Jean Louis To: bug-gnu-emacs@gnu.org Subject: 31.0.50; run-with-idle-timer not working unless there is some activity X-Debbugs-Cc: Date: Sat, 04 Jan 2025 01:30:03 +0300 Message-ID: <87r05jpm38.fsf@gnu.support> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_12_24=1.049, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) The function is not working unless there is some activity. I remember it worked well in past, do not know what changed. (defun my-message () (message (format-time-string "%T Hello"))) (run-with-idle-timer 10 t 'my-message) >From that point I will see one hello message but if I do not touch anything it will not repeat. That is bug. It should be repeating the message each 10 seconds. In GNU Emacs 31.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) of 2024-12-05 built on lco2 Repository revision: 25b4bf7fcd75564f23b2e60e29e8ff7354186371 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101007 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --with-mailutils --with-native-compilation=yes --with-tree-sitter --with-imagemagick' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ IMAGEMAGICK JPEG LCMS2 LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_COLLATE: en_US.UTF-8 value of $LC_CTYPE: en_US.UTF-8 value of $LC_MESSAGES: en_US.UTF-8 value of $LANG: de_DE.UTF-8 value of $XMODIFIERS: @im=exwm-xim locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-print debug backtrace find-func misearch multi-isearch cl-extra shortdoc text-property-search comp-common rx help-fns byte-opt gv bytecomp byte-compile radix-tree help-mode leuven-dark-theme cus-theme cus-edit pp cus-start cus-load icons wid-edit cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 117793 13718) (symbols 48 9320 2) (strings 32 26053 2808) (string-bytes 1 732164) (vectors 16 13753) (vector-slots 8 184380 13787) (floats 8 123 18) (intervals 56 540 20) (buffers 992 15)) -- Jean Louis From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 04 12:58:07 2025 Received: (at 75361) by debbugs.gnu.org; 4 Jan 2025 17:58:07 +0000 Received: from localhost ([127.0.0.1]:57203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tU8PW-0004kg-OW for submit@debbugs.gnu.org; Sat, 04 Jan 2025 12:58:07 -0500 Received: from mail-vk1-xa35.google.com ([2607:f8b0:4864:20::a35]:45243) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tU8PT-0004kK-GD for 75361@debbugs.gnu.org; Sat, 04 Jan 2025 12:58:05 -0500 Received: by mail-vk1-xa35.google.com with SMTP id 71dfb90a1353d-51bc2363fd7so2682657e0c.2 for <75361@debbugs.gnu.org>; Sat, 04 Jan 2025 09:58:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736013483; x=1736618283; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=R30r4TOcBW1cVW/U7/ynpgaLQ1aTktIoeYW2gdm+2Ec=; b=WLW8ck/i6697ygx+S2mFPELR6JkSyrZNj+AuCTqYoQXi1ZWkWvT6WbnoPXY6jvA6aW z83U+BwuD5BRh5Ylm1gyhpEB4HBa/tQ3BW6d24pbWySrHuphXtJ1qMZiK6KRrsQO++4/ LY/NY8E0t0RJbLxz7Mgry/8bPk3urSUanLt34JvdObSa/vEsiZgqFYbStWdKRb5R9RgP 1jT4zGz40J8KiPDpbPfoepSHVu7FDhF+FLovb00NWWIOiTLoS5Atl5kNS0QTuAQhWJm8 qBMFlH2dTH6iV8O4vwHkjAVefHoT20HDh/UdNzO3hfjcVPIm8dOfNG5fI+kuYH9vKwq6 tWwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736013483; x=1736618283; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=R30r4TOcBW1cVW/U7/ynpgaLQ1aTktIoeYW2gdm+2Ec=; b=l9qSCTyYHHXyd44GZOMasGS6ZZG7dY6eTDbs6vOmiiW0uKWAxU0UKdG2sE55dzwlRv hi9rqa5rhkie4QdVRW8XAS3bdyKnlWsrhRvTOgJub4IhWPGlrWG2F8M7G8BAzz6eQ5va meinIYhyzzs2IiHtdV+VcTryoAauHAFcacEfPTl01IXspoLETWsPKAqEmZTzAkQBCKzW jHfyy4Z6kVhnXvMeAqeH3czn9mwU1VMDVPr6NcWpeBE0gy/soDxEx9BJOJvFLioI4Khe byDEPMad6LiRBxXzL09q+TEE4gJVHYrCtLSVNVzF0tFUck20Jhuvt3ZrUzu1A/V4g0uu vT7Q== X-Gm-Message-State: AOJu0Yym8hrN98CgvyW9YNMaHDTKq+Zm61lNKCdL9AzYoTpCFoGaLieB 8RWEwEJFApx3DKVrPv9Ad7Ze6S3TSYMxlalx3p8e59d++AdUD7SR2+7KrCoPiP1t3nFHX4wQd70 /EnA66XtuEChZHy0BxzWgQtIaIhA= X-Gm-Gg: ASbGncsDfX+K1T0aK4Bg+RoMv/S2Dat6//U7pSXwUmWGhu89jSB3pPOfqd5wXEl/EWk dxsdEVuwUbDJdKoLSJF5kNhlvnyjIICyB3gFKnQ== X-Google-Smtp-Source: AGHT+IEE51rN1MYE1OIYVy7hu7jthgNniVQAQK955TxxmByc4tfLC1NbNKmP4SX0iF9QLMY1CQm6fomhAdv7HWy3O1Y= X-Received: by 2002:a05:6102:e0e:b0:4b2:9e8b:54c with SMTP id ada2fe7eead31-4b2cc488c39mr38603768137.24.1736013482593; Sat, 04 Jan 2025 09:58:02 -0800 (PST) MIME-Version: 1.0 References: <87r05jpm38.fsf@gnu.support> In-Reply-To: <87r05jpm38.fsf@gnu.support> From: Ship Mints Date: Sat, 4 Jan 2025 12:56:49 -0500 Message-ID: Subject: Re: bug#75361: 31.0.50; run-with-idle-timer not working unless there is some activity To: Jean Louis Content-Type: multipart/alternative; boundary="000000000000f49389062ae5228d" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75361 Cc: 75361@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000f49389062ae5228d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I believe this is intended behavior. You should use a regular interval timer if you want repeating executions that do not depend upon Emacs entering the idle state. Not sure why you think this worked differently in the recent past. "Emacs becomes *idle* when it starts waiting for user input (unless it waits for input with a timeout, see Reading One Event ), and it remains idle until the user provides some input. If a timer is set for five seconds of idleness, it runs approximately five seconds after Emacs first becomes idle. Even if repeat is non-nil, this timer will not run again as long as Emacs remains idle, because the duration of idleness will continue to increase and will not go down to five seconds again." On Sat, Jan 4, 2025 at 12:39=E2=80=AFPM Jean Louis wrote= : > > The function is not working unless there is some activity. I remember it > worked well in past, do not know what changed. > > (defun my-message () > (message (format-time-string "%T Hello"))) > > (run-with-idle-timer 10 t 'my-message) > > From that point I will see one hello message but if I do not touch > anything it will not repeat. > > That is bug. > > It should be repeating the message each 10 seconds. > > > In GNU Emacs 31.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version > 3.24.38, cairo version 1.16.0) of 2024-12-05 built on lco2 > Repository revision: 25b4bf7fcd75564f23b2e60e29e8ff7354186371 > Repository branch: master > Windowing system distributor 'The X.Org Foundation', version 11.0.1210100= 7 > System Description: Debian GNU/Linux 12 (bookworm) > > Configured using: > 'configure --with-mailutils --with-native-compilation=3Dyes > --with-tree-sitter --with-imagemagick' > > Configured features: > ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ > IMAGEMAGICK JPEG LCMS2 LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY > INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF > TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB > > Important settings: > value of $LC_ALL: en_US.UTF-8 > value of $LC_COLLATE: en_US.UTF-8 > value of $LC_CTYPE: en_US.UTF-8 > value of $LC_MESSAGES: en_US.UTF-8 > value of $LANG: de_DE.UTF-8 > value of $XMODIFIERS: @im=3Dexwm-xim > locale-coding-system: utf-8-unix > > Major mode: Lisp Interaction > > Minor modes in effect: > tooltip-mode: t > global-eldoc-mode: t > eldoc-mode: t > show-paren-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > minibuffer-regexp-mode: t > line-number-mode: t > indent-tabs-mode: t > transient-mark-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > > Load-path shadows: > None found. > > Features: > (shadow sort mail-extr emacsbug message mailcap yank-media puny dired > dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 > epg-config gnus-util time-date subr-x mm-decode mm-bodies mm-encode > mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 > rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-print debug > backtrace find-func misearch multi-isearch cl-extra shortdoc > text-property-search comp-common rx help-fns byte-opt gv bytecomp > byte-compile radix-tree help-mode leuven-dark-theme cus-theme cus-edit > pp cus-start cus-load icons wid-edit cl-loaddefs cl-lib rmc iso-transl > tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks > lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd > touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list > replace newcomment text-mode lisp-mode prog-mode register page tab-bar > menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse > jit-lock font-lock syntax font-core term/tty-colors frame minibuffer > nadvice seq simple cl-generic indonesian philippine cham georgian > utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean > japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european > ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop > case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure > cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp > files window text-properties overlay sha1 md5 base64 format env > code-pages mule custom widget keymap hashtable-print-readable backquote > threads dbusbind inotify lcms2 dynamic-setting system-font-setting > font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar > make-network-process native-compile emacs) > > Memory information: > ((conses 16 117793 13718) (symbols 48 9320 2) (strings 32 26053 2808) > (string-bytes 1 732164) (vectors 16 13753) > (vector-slots 8 184380 13787) (floats 8 123 18) (intervals 56 540 20) > (buffers 992 15)) > > -- > Jean Louis > > > > --000000000000f49389062ae5228d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I believe this is intended behavior. You should use a regular interval t= imer if you want repeating executions that=C2=A0do=C2=A0not depend upon Ema= cs entering the idle state. Not sure why you think this worked differently = in the recent past.

"Emacs becomes=C2=A0idle=C2=A0when it starts waiting for use= r input (unless it waits for input with a timeout, see=C2=A0Reading One Event), and it remains idle until the user provi= des some input. If a timer is set for five seconds of idleness, it runs app= roximately five seconds after Emacs first becomes idle. Even if=C2=A0repeat=C2=A0is non-nil, this timer will not run ag= ain as long as Emacs remains idle, because the duration of idleness will co= ntinue to increase and will not go down to five seconds again."=

=

On Sat, Jan 4, 2025 at 12:39=E2=80=AFPM Jean Louis &l= t;bugs@gnu.support> wrote:

The function is not working unless there is some activity. I remember it worked well in past, do not know what changed.

(defun my-message ()
=C2=A0 =C2=A0 (message (format-time-string "%T Hello")))

(run-with-idle-timer 10 t 'my-message)

>From that point I will see one hello message but if I do not touch
anything it will not repeat.

That is bug.

It should be repeating the message each 10 seconds.


In GNU Emacs 31.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version
=C2=A03.24.38, cairo version 1.16.0) of 2024-12-05 built on lco2
Repository revision: 25b4bf7fcd75564f23b2e60e29e8ff7354186371
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.1= 2101007
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
=C2=A0'configure --with-mailutils --with-native-compilation=3Dyes
=C2=A0--with-tree-sitter --with-imagemagick'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG LCMS2 LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
=C2=A0 value of $LC_ALL: en_US.UTF-8
=C2=A0 value of $LC_COLLATE: en_US.UTF-8
=C2=A0 value of $LC_CTYPE: en_US.UTF-8
=C2=A0 value of $LC_MESSAGES: en_US.UTF-8
=C2=A0 value of $LANG: de_DE.UTF-8
=C2=A0 value of $XMODIFIERS: @im=3Dexwm-xim
=C2=A0 locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 eldoc-mode: t
=C2=A0 show-paren-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 minibuffer-regexp-mode: t
=C2=A0 line-number-mode: t
=C2=A0 indent-tabs-mode: t
=C2=A0 transient-mark-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util time-date subr-x mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-print debug
backtrace find-func misearch multi-isearch cl-extra shortdoc
text-property-search comp-common rx help-fns byte-opt gv bytecomp
byte-compile radix-tree help-mode leuven-dark-theme cus-theme cus-edit
pp cus-start cus-load icons wid-edit cl-loaddefs cl-lib rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse
jit-lock font-lock syntax font-core term/tty-colors frame minibuffer
nadvice seq simple cl-generic indonesian philippine cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs)

Memory information:
((conses 16 117793 13718) (symbols 48 9320 2) (strings 32 26053 2808)
=C2=A0(string-bytes 1 732164) (vectors 16 13753)
=C2=A0(vector-slots 8 184380 13787) (floats 8 123 18) (intervals 56 540 20)=
=C2=A0(buffers 992 15))

--
Jean Louis



--000000000000f49389062ae5228d-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 04 13:46:36 2025 Received: (at 75361) by debbugs.gnu.org; 4 Jan 2025 18:46:36 +0000 Received: from localhost ([127.0.0.1]:57356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tU9AR-0006zu-Nb for submit@debbugs.gnu.org; Sat, 04 Jan 2025 13:46:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34324) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tU9AN-0006zP-DV; Sat, 04 Jan 2025 13:46:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tU9AH-0005Hl-JO; Sat, 04 Jan 2025 13:46:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=m1AuWeoU+rV3zdTt1IdWWFBS+vIk/4HTtTcv5OdUIQI=; b=MSaeRYryCjdq7Rah5kd+ ehdfT/wrp8GTXdun3qkbvE5DEqYAHgjmNorbFPOUCduC3DuplGSsm9tNzTlngMEIBXwL2xZ5P651y pRzq08IA81HBBMCkm4q6/Tv5nd266Nm3lGnUARv800fBk3zroCkEZb4UZOfjFXGI5jPWnO6FTIfv4 umaZuL5Xw88D41lb8tJVuxXbZE6ssosgc/hScXoXfsMIZEpH6d3aL/ZT5HllAekEb1NmfCj+eZAbr nI0i2LqoalEe3ix28/Ud1t/YtK94vFf/vFYg0VwWZ8KfFeAsI3XJJe2P4izThKJQfdVEA514PUc6W qJXfRZiPrzyNkQ==; Date: Sat, 04 Jan 2025 20:46:22 +0200 Message-Id: <86o70mbeo1.fsf@gnu.org> From: Eli Zaretskii To: Jean Louis In-Reply-To: <87r05jpm38.fsf@gnu.support> (message from Jean Louis on Sat, 04 Jan 2025 01:30:03 +0300) Subject: Re: bug#75361: 31.0.50; run-with-idle-timer not working unless there is some activity References: <87r05jpm38.fsf@gnu.support> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75361 Cc: 75361@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 75361 notabug thanks > From: Jean Louis > Date: Sat, 04 Jan 2025 01:30:03 +0300 > > > The function is not working unless there is some activity. I remember it > worked well in past, do not know what changed. > > (defun my-message () > (message (format-time-string "%T Hello"))) > > (run-with-idle-timer 10 t 'my-message) > > >From that point I will see one hello message but if I do not touch > anything it will not repeat. That's expected. From the ELisp manual: Emacs becomes “idle” when it starts waiting for user input (unless it waits for input with a timeout, *note Reading One Event::), and it remains idle until the user provides some input. If a timer is set for five seconds of idleness, it runs approximately five seconds after Emacs first becomes idle. Even if REPEAT is non-‘nil’, this timer will not run again as long as Emacs remains idle, because the duration of idleness will continue to increase and will not go down to five seconds again. > That is bug. > > It should be repeating the message each 10 seconds. See above: your expectations are incorrect. This is not a bug. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 15:29:49 2025 Received: (at 75361) by debbugs.gnu.org; 6 Jan 2025 20:29:49 +0000 Received: from localhost ([127.0.0.1]:40303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUtjR-0001Cj-Ai for submit@debbugs.gnu.org; Mon, 06 Jan 2025 15:29:49 -0500 Received: from stw1.rcdrun.com ([217.170.207.13]:47543) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUtjO-0001CU-7C for 75361@debbugs.gnu.org; Mon, 06 Jan 2025 15:29:47 -0500 Received: from localhost ([::ffff:41.75.173.43]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001BF3B.00000000677C3D37.001A8DC5; Mon, 06 Jan 2025 13:29:42 -0700 Date: Sat, 4 Jan 2025 22:21:51 +0300 From: Jean Louis To: Ship Mints Subject: SOLVED - Re: bug#75361: 31.0.50; run-with-idle-timer not working unless there is some activity Message-ID: References: <87r05jpm38.fsf@gnu.support> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75361 Cc: 75361@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * Ship Mints [2025-01-04 20:58]: > I believe this is intended behavior. You should use a regular interval > timer if you want repeating executions that do not depend upon Emacs > entering the idle state. Not sure why you think this worked differently in > the recent past. > > "Emacs becomes *idle* when it starts waiting for user input (unless it > waits for input with a timeout, see Reading One Event > ), > and it remains idle until the user provides some input. If a timer is set > for five seconds of idleness, it runs approximately five seconds after > Emacs first becomes idle. Even if repeat is non-nil, this timer will not > run again as long as Emacs remains idle, because the duration of idleness > will continue to increase and will not go down to five seconds again." Okay I got it. Though I am surprised as I was using idle timer thousands of times. I was thinking it repeated itself, while it didn't. Recently I started observing and have seen it is getting blocked, I wondered why, due to lack of understanding. I have found solution to my problem, so I will simply run the function `run-with-timer` and then check if user is idle to execute it. Basically, I do not need executions if user is not idle. (defun my-hello () (when (and (current-idle-time) (>= (cadr (current-idle-time)) 5)) (rcd-message "Current idle time: %s" (cadr (current-idle-time))))) (run-with-timer 5 5 'my-hello) So in the sense of how I understand it, `run-with-idle-timer` only sounds as the function I need, while it is not. I can make it this way: (run-with-timer 10 10 'rcd-run-repeatingly-when-idle 5 'my-hello) (defun rcd-run-repeatingly-when-idle (secs function &rest args) (when (and (current-idle-time) (>= (cadr (current-idle-time)) secs)) (apply 'funcall function args))) As that way it will use `run-with-timer` though only when user is idle for SECS. -- Jean Louis From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 15:49:01 2025 Received: (at 75361) by debbugs.gnu.org; 6 Jan 2025 20:49:01 +0000 Received: from localhost ([127.0.0.1]:40412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUu20-0002CU-Vu for submit@debbugs.gnu.org; Mon, 06 Jan 2025 15:49:01 -0500 Received: from mail-vs1-xe2c.google.com ([2607:f8b0:4864:20::e2c]:59805) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tUu1y-0002CE-Nd for 75361@debbugs.gnu.org; Mon, 06 Jan 2025 15:49:00 -0500 Received: by mail-vs1-xe2c.google.com with SMTP id ada2fe7eead31-4afe99e5229so4179226137.3 for <75361@debbugs.gnu.org>; Mon, 06 Jan 2025 12:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736196533; x=1736801333; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jH3lrSKgLR0G3I8daSK2xq0d5zziUQTgcXA+YaycWVA=; b=DDqVzP22dsXhFR/+9Ts/CojtPwa9/Wt77yuiIIKO4/yZxoZnClH/W8iYQAE0Mn9sCv VhAh3qZGMmoaBDoRXA2vjQ2nOdJ0z7pVBc+rEoMf2EEjlHb5jCpzXz+r3Xz714n0PamM K+1fcQdlJFu+5fZHXtYZCzvb+tCTQkRQIKPBnZRL6MpC3PltvwlZp36n6dwTRoTP1i9U 8l8v5AcVGZ2SX5ZkwoCuX1rkoFxWaJfZl09Tv0gjTsRW3um6CUPe6sBj64AfqzO7N2pB UYJLpZOeu4xybp7KiPjDjChEgcR/gxWwGN24Wb+AmoRltX47Z4eug5xt0QKFcodOuVXr 8AYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736196533; x=1736801333; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jH3lrSKgLR0G3I8daSK2xq0d5zziUQTgcXA+YaycWVA=; b=j/aICu8zvBnn9B/YaVPTDbv9Hk37EgHzeAj8iVhU+UK84s1wWSKmBPUUYGWGIrTFgM REBbpIYk6UHwu8NfpUniYrR6cZUjbqMkt2cIjz+Yue5c7lII0rhGpQnLUNVkSMYkHzwV PQBucEte5vqx15PlRHj5ExF3/lq9JIzTaPE1AWghldOaWSrd8U0wPE5WnXLRAeBM25x8 sbpBj8CY1pM2RUkDBBTMOMEBsWW3bGkRGvnnrd4miUb3vjsr6VAnOSWVW/vaauAeJHTx 94zrFgzSjtm6yI0ScvG8bwrOYIQtw/ChXIkTN5CFMyMGsL0PGQ2trcypdcLOGoj8Ten3 KgbA== X-Gm-Message-State: AOJu0YzpD7ybDUsywwCv0sQC5fq81u3XDosPzVRpWh/qSh6fcLNdQTrp +krfMUUCbR/ziiyPr2bbB1kw3d+PbeqbRMTIsMFjGTvKluhkMNuwk0xje77gxvwJMuRnE6cqfMy xZq0tJPLOTFbkgu+MaUznJlhfXV0= X-Gm-Gg: ASbGnctXzplNCZbRcw3G/+eVBYWr6WokhZ5QLepaR8TzQeNCb2X+aLIBsuUTjdwcHn2 8kXn1ov1nJC4nmy/AlsxiBzc4nLEPqUNinLLYIg== X-Google-Smtp-Source: AGHT+IEtauGRd0NcOGzH/dpepHQovyopRqnlzXKmS5f2vArXIBCii1lJw/BpM8m6XQeH6T3+CFtSOj7rERI9p2G8LKQ= X-Received: by 2002:a05:6102:32d4:b0:4b1:24c0:4274 with SMTP id ada2fe7eead31-4b2cc494ed0mr46084177137.26.1736196532737; Mon, 06 Jan 2025 12:48:52 -0800 (PST) MIME-Version: 1.0 References: <87r05jpm38.fsf@gnu.support> In-Reply-To: From: Ship Mints Date: Mon, 6 Jan 2025 15:47:36 -0500 X-Gm-Features: AbW1kvbDNve42mMJruRxcW9MMXS_27pNTq7jA7OjxA7e28Dq9iVtpKa7Ck1sUY4 Message-ID: Subject: Re: bug#75361: SOLVED - Re: bug#75361: 31.0.50; run-with-idle-timer not working unless there is some activity To: Jean Louis Content-Type: multipart/alternative; boundary="000000000000982677062b0fc1f3" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75361 Cc: 75361@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000982677062b0fc1f3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Also in the documentation for idle timers, you can find a different approach that might work for you than the one you proposed. At the very least, your timer will fire only when Emacs is idle rather than polling for idleness. HTH. https://www.gnu.org/software/emacs/manual/html_node/elisp/Idle-Timers.html "Similarly, do not write an idle timer function that sets up another idle timer (including the same idle timer) with secs argument less than or equal to the current idleness time. Such a timer will run almost immediately, and continue running again and again, instead of waiting for the next time Emacs becomes idle. The correct approach is to reschedule with an appropriate increment of the current value of the idleness time, as described below." -Stephane On Mon, Jan 6, 2025 at 3:30=E2=80=AFPM Jean Louis wrote: > * Ship Mints [2025-01-04 20:58]: > > I believe this is intended behavior. You should use a regular interval > > timer if you want repeating executions that do not depend upon Emacs > > entering the idle state. Not sure why you think this worked differently > in > > the recent past. > > > > "Emacs becomes *idle* when it starts waiting for user input (unless it > > waits for input with a timeout, see Reading One Event > > < > https://www.gnu.org/software/emacs/manual/html_node/elisp/Reading-One-Eve= nt.html > >), > > and it remains idle until the user provides some input. If a timer is s= et > > for five seconds of idleness, it runs approximately five seconds after > > Emacs first becomes idle. Even if repeat is non-nil, this timer will no= t > > run again as long as Emacs remains idle, because the duration of idlene= ss > > will continue to increase and will not go down to five seconds again." > > Okay I got it. Though I am surprised as I was using idle timer > thousands of times. I was thinking it repeated itself, while it > didn't. > > Recently I started observing and have seen it is getting blocked, I > wondered why, due to lack of understanding. > > I have found solution to my problem, so I will simply run the function > `run-with-timer` and then check if user is idle to execute it. > > Basically, I do not need executions if user is not idle. > > (defun my-hello () > (when (and (current-idle-time) > (>=3D (cadr (current-idle-time)) 5)) > (rcd-message "Current idle time: %s" (cadr (current-idle-time))))) > > (run-with-timer 5 5 'my-hello) > > So in the sense of how I understand it, `run-with-idle-timer` only > sounds as the function I need, while it is not. > > I can make it this way: > > (run-with-timer 10 10 'rcd-run-repeatingly-when-idle 5 'my-hello) > > (defun rcd-run-repeatingly-when-idle (secs function &rest args) > (when (and (current-idle-time) > (>=3D (cadr (current-idle-time)) secs)) > (apply 'funcall function args))) > > As that way it will use `run-with-timer` though only when user is idle > for SECS. > > -- > Jean Louis > > > > --000000000000982677062b0fc1f3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Also in the documentation for idle timers, you can find a different appr= oach that might work for you than the one you proposed. At the very least, = your timer will fire only when Emacs is idle rather than polling for idlene= ss. HTH.
=

&= quot;Simi= larly, do not write an idle timer function that sets up another idle timer = (including the same idle timer) with=C2=A0secs=C2=A0argument = less than or equal to the current idleness time. Such a timer will run almo= st immediately, and continue running again and again, instead of waiting fo= r the next time Emacs becomes idle. The correct approach is to reschedule w= ith an appropriate increment of the current value of the idleness time, as = described below."

-Stephane

On Mon, Jan 6, 2025 at = 3:30=E2=80=AFPM Jean Louis <bugs@gnu.support> wrote:
* Ship Mints <shipmints@gmail.com> [2025= -01-04 20:58]:
> I believe this is intended behavior. You should use a regular interval=
> timer if you want repeating executions that do not depend upon Emacs > entering the idle state. Not sure why you think this worked differentl= y in
> the recent past.
>
> "Emacs becomes *idle* when it starts waiting for user input (unle= ss it
> waits for input with a timeout, see Reading One Event
> <https://www= .gnu.org/software/emacs/manual/html_node/elisp/Reading-One-Event.html&g= t;),
> and it remains idle until the user provides some input. If a timer is = set
> for five seconds of idleness, it runs approximately five seconds after=
> Emacs first becomes idle. Even if repeat is non-nil, this timer will n= ot
> run again as long as Emacs remains idle, because the duration of idlen= ess
> will continue to increase and will not go down to five seconds again.&= quot;

Okay I got it. Though I am surprised as I was using idle timer
thousands of times. I was thinking it repeated itself, while it
didn't.

Recently I started observing and have seen it is getting blocked, I
wondered why, due to lack of understanding.

I have found solution to my problem, so I will simply run the function
`run-with-timer` and then check if user is idle to execute it.

Basically, I do not need executions if user is not idle.

(defun my-hello ()
=C2=A0 (when (and (current-idle-time)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(>=3D (cadr (current-idl= e-time)) 5))
=C2=A0 =C2=A0 (rcd-message "Current idle time: %s" (cadr (current= -idle-time)))))

(run-with-timer 5 5 'my-hello)

So in the sense of how I understand it, `run-with-idle-timer` only
sounds as the function I need, while it is not.

I can make it this way:

(run-with-timer 10 10 'rcd-run-repeatingly-when-idle 5 'my-hello)
(defun rcd-run-repeatingly-when-idle (secs function &rest args)
=C2=A0 =C2=A0 (when (and (current-idle-time)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(>=3D (cadr (curr= ent-idle-time)) secs))
=C2=A0 =C2=A0 =C2=A0 (apply 'funcall function args)))

As that way it will use `run-with-timer` though only when user is idle
for SECS.

--
Jean Louis



--000000000000982677062b0fc1f3-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 16:28:11 2025 Received: (at 75361-done) by debbugs.gnu.org; 6 Jan 2025 21:28:11 +0000 Received: from localhost ([127.0.0.1]:40816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUudv-0004Dw-G9 for submit@debbugs.gnu.org; Mon, 06 Jan 2025 16:28:11 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:60632) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tUuds-0004Di-BS for 75361-done@debbugs.gnu.org; Mon, 06 Jan 2025 16:28:10 -0500 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5d3ecae02beso18715811a12.0 for <75361-done@debbugs.gnu.org>; Mon, 06 Jan 2025 13:28:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736198887; x=1736803687; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=ogx1bYsi7GWOyK987ndEU/peGS2ISygZ8ctQ6zBjaKg=; b=Bbx63U2rX+DuofhctgmCijz3xxBAOKu+CbaH5tV8Y/ZRMeH7tLtff30frv+zCIdFDk 2SXHln1Jq1pVEfm5m6kV0cWDbVBsRKdU66N9oZrd+jfcoYuXtfxt4vBmY8/YndfVedo+ 2Z9k9Ec+lNYUwKuzVQU/OHGzbyWWHlxB6Za91pyslgdHfewhft9UY+xDhR1Xll1onN8H Swb+jERNG/Rcm/qw2TlIb+qF9wzgsBI+tet+42iEf6sISk6OJCTGxsGfiVjSAQlpGqcq mbbJwE6oA60CBKwTS3H/Sst3kY8EaGhPMrIpWLe8v+dpbfZ5U+jZBUkbsvylnRVA6/9d vjAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736198887; x=1736803687; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ogx1bYsi7GWOyK987ndEU/peGS2ISygZ8ctQ6zBjaKg=; b=wAzut3whmszH2bCWP8wIlpi64rKSiripiY1ujCVmTZT/Ij5TGChcXndQw1p4TBWuVK VeuU8U/fPuulp3+iYG0JKUXe00VPnIh0kgep8lk6M3Nwxy+M3K6RAxHGEffmLbB3mIfE YTcLoe6lSKSmgsgVFKKc/8k2eGqANsK98Z4HOTWqSFXeFyeFjwhHp8q843RcJ1ssOVvU 5Jdc006OjpLX5gOd+9MAzWcsNwHpGCDsbc4DPTv6QyuvNn98doEE0MV74gs2PalHuk2N 89qDGTiOxC4sVedYpWpUCaYApJOqYjfZfC+5XSHrNMFoNA6MdtxhuQm7YLgYPcpGhb4F w0OA== X-Gm-Message-State: AOJu0Yy2icWo/u/jE6Le5jgCHiW5X/feOZYH2FM9CeLGdG4QfXVnf4Ir vgqROhh4+1gHorI0VU/DFTVOSWytF+ApZaxw30tI0K/7bfRiXr37nCsT8kTKTK1KexyXkfZVBKT l0ZRLmN9TnubOtaBWkR2v09ygM5g= X-Gm-Gg: ASbGncsnS9rg5KzSAc25e3yKwJTIo3rYlwWVtXeeeHwqiBLuUT2hbZLjP05yKOXppUm hzVQHhyvwQDhLe7MRA+0qiKl1XJZS+nqi1hZmRQ9S X-Google-Smtp-Source: AGHT+IHd5IpG2RFpPReNoBCOmKDAlciszOePKvf3ZQmAzn874EfUUvwFn0vmmUGVQU61ad1I81jo8laX0IOOJk3F7cc= X-Received: by 2002:a05:6402:354b:b0:5d4:4143:c082 with SMTP id 4fb4d7f45d1cf-5d81ddfbda8mr46632362a12.21.1736198886775; Mon, 06 Jan 2025 13:28:06 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 6 Jan 2025 15:28:06 -0600 From: Stefan Kangas In-Reply-To: <86o70mbeo1.fsf@gnu.org> References: <87r05jpm38.fsf@gnu.support> <86o70mbeo1.fsf@gnu.org> MIME-Version: 1.0 Date: Mon, 6 Jan 2025 15:28:06 -0600 X-Gm-Features: AbW1kvZj6dbN4WVQns2MTuKOsB3atxgq-UmDKCA42t-QjLDC-v_I3JgPwNyBi84 Message-ID: Subject: Re: bug#75361: 31.0.50; run-with-idle-timer not working unless there is some activity To: Eli Zaretskii , Jean Louis Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75361-done Cc: 75361-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > tags 75361 notabug > thanks > >> From: Jean Louis >> Date: Sat, 04 Jan 2025 01:30:03 +0300 >> >> >> The function is not working unless there is some activity. I remember it >> worked well in past, do not know what changed. >> >> (defun my-message () >> (message (format-time-string "%T Hello"))) >> >> (run-with-idle-timer 10 t 'my-message) >> >> >From that point I will see one hello message but if I do not touch >> anything it will not repeat. > > That's expected. From the ELisp manual: > > Emacs becomes =E2=80=9Cidle=E2=80=9D when it starts waiting for user= input (unless it > waits for input with a timeout, *note Reading One Event::), and it > remains idle until the user provides some input. If a timer is set for > five seconds of idleness, it runs approximately five seconds after Emac= s > first becomes idle. Even if REPEAT is non-=E2=80=98nil=E2=80=99, this = timer will not > run again as long as Emacs remains idle, because the duration of > idleness will continue to increase and will not go down to five seconds > again. > >> That is bug. >> >> It should be repeating the message each 10 seconds. > > See above: your expectations are incorrect. > > This is not a bug. I'm therefore closing this bug report. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 10 13:56:18 2025 Received: (at 75361) by debbugs.gnu.org; 10 Jan 2025 18:56:19 +0000 Received: from localhost ([127.0.0.1]:58789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tWKB8-000222-Lr for submit@debbugs.gnu.org; Fri, 10 Jan 2025 13:56:18 -0500 Received: from stw1.rcdrun.com ([217.170.207.13]:46403) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tWKB7-00021q-A3 for 75361@debbugs.gnu.org; Fri, 10 Jan 2025 13:56:17 -0500 Received: from localhost ([::ffff:197.239.13.127]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001BF3D.0000000067816D4E.001C1A6E; Fri, 10 Jan 2025 11:56:13 -0700 Date: Fri, 10 Jan 2025 18:42:01 +0300 From: Jean Louis To: Ship Mints Subject: Re: bug#75361: SOLVED - Re: bug#75361: 31.0.50; run-with-idle-timer not working unless there is some activity Message-ID: References: <87r05jpm38.fsf@gnu.support> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Thanks much. (defun rcd-check-if-idle (&optional seconds) "Verify if Emacs is idle for number of SECONDS. If SECONDS is not provided, default is 3 seconds." (cond ((and (current-idle-time) (>= (cadr (current-idle-time)) (or seconds 3)) t)) (t nil))) Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [217.170.207.13 listed in sa-trusted.bondedsender.org] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [217.170.207.13 listed in bl.score.senderscore.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.1 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date X-Debbugs-Envelope-To: 75361 Cc: 75361@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) Thanks much. (defun rcd-check-if-idle (&optional seconds) "Verify if Emacs is idle for number of SECONDS. If SECONDS is not provided, default is 3 seconds." (cond ((and (current-idle-time) (>= (cadr (current-idle-time)) (or seconds 3)) t)) (t nil))) I am using now this function to check if user is idle while running it `run-with-timer`. -- Jean Louis From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 10 15:23:22 2025 Received: (at 75361) by debbugs.gnu.org; 10 Jan 2025 20:23:22 +0000 Received: from localhost ([127.0.0.1]:58941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tWLXN-0006gX-MU for submit@debbugs.gnu.org; Fri, 10 Jan 2025 15:23:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44354) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tWLXL-0006gA-J2 for 75361@debbugs.gnu.org; Fri, 10 Jan 2025 15:23:20 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tWLXE-0004X6-4V; Fri, 10 Jan 2025 15:23:13 -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=USJkgtTRyElA+VOBHR5xu86imTBRjcFg/aKE3vZouc4=; b=XVFS8v/ACGmf OVVol1RrgjBbnh2ADjwnINl30bL+h2BYjl45ZwqyZN4JJncK5hNsFCLv6d0GpDixrAc2qIoWVOA3k GKDZNgS08wI/p2cf3lTl26d/YdCIV3AhLA7p1CFeKqU0TnJuR4CyC2ftkiROh+A3h2C+uxFu777CH hzt9JoME5rwJCYb0L/oPclvlAIGmOnMYuF/VPHmjiHQ5NDIGL4Jlj4LjsDLusFnoQB1P0vhFlAnzc NKHuuPVtw7jcWAyw2SFLiPXnJr7KWIdRhJhBSMXI2tyNGL47W3nJ3V4O+XXQDl1QHuNlN9+WspXtl Llxxx9ZkMfkM2NurIUUAgA==; Date: Fri, 10 Jan 2025 22:22:59 +0200 Message-Id: <86y0zizae4.fsf@gnu.org> From: Eli Zaretskii To: Jean Louis In-Reply-To: (message from Jean Louis on Fri, 10 Jan 2025 18:42:01 +0300) Subject: Re: bug#75361: SOLVED - Re: bug#75361: 31.0.50; run-with-idle-timer not working unless there is some activity References: <87r05jpm38.fsf@gnu.support> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75361 Cc: 75361@debbugs.gnu.org, shipmints@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 75361@debbugs.gnu.org > Date: Fri, 10 Jan 2025 18:42:01 +0300 > From: Jean Louis > > Thanks much. > > (defun rcd-check-if-idle (&optional seconds) > "Verify if Emacs is idle for number of SECONDS. > > If SECONDS is not provided, default is 3 seconds." > (cond ((and (current-idle-time) > (>= (cadr (current-idle-time)) (or seconds 3)) t)) > (t nil))) > > I am using now this function to check if user is idle while running it > `run-with-timer`. current-idle-time doesn't measure the time the user is idle, it measures the time Emacs is idle. Emacs can have its processing triggered by events other than user input. From unknown Sun Sep 07 18:03:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 08 Feb 2025 12:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator