GNU bug report logs - #79918
[PATCH] ; * lisp/emacs-lisp/igc.el: Add docstrings and fix typos

Previous Next

Package: emacs;

Reported by: Jeremy Bryant <jb <at> jeremybryant.net>

Date: Sun, 30 Nov 2025 21:31:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 79918 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to eliz <at> gnu.org, eller.helmut <at> gmail.com, bug-gnu-emacs <at> gnu.org:
bug#79918; Package emacs. (Sun, 30 Nov 2025 21:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jeremy Bryant <jb <at> jeremybryant.net>:
New bug report received and forwarded. Copy sent to eliz <at> gnu.org, eller.helmut <at> gmail.com, bug-gnu-emacs <at> gnu.org. (Sun, 30 Nov 2025 21:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jeremy Bryant <jb <at> jeremybryant.net>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] ; * lisp/emacs-lisp/igc.el: Add docstrings and fix typos
Date: Sun, 30 Nov 2025 21:30:00 +0000
[Message part 1 (text/plain, inline)]
Here is a patch to add docstrings and fix typos.

WDYT?

[0001-lisp-emacs-lisp-igc.el-Add-docstrings-and-fix-typos.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79918; Package emacs. (Mon, 01 Dec 2025 07:32:01 GMT) Full text and rfc822 format available.

Message #8 received at 79918 <at> debbugs.gnu.org (full text, mbox):

From: Helmut Eller <eller.helmut <at> gmail.com>
To: Jeremy Bryant <jb <at> jeremybryant.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 79918 <at> debbugs.gnu.org
Subject: Re: bug#79918: [PATCH] ; * lisp/emacs-lisp/igc.el: Add docstrings
 and fix typos
Date: Mon, 01 Dec 2025 08:31:36 +0100
On Sun, Nov 30 2025, Jeremy Bryant wrote:

> Here is a patch to add docstrings and fix typos.
>
> WDYT?
[...]
>  (defun igc--current-idle-time ()
> +  "Current idle time available for GC when idle.
> +See `igc--on-idle'."
>    (let ((idle-time (current-idle-time)))
>      (if idle-time (float-time idle-time) 0)))

The idea is that igc--current-idle-time is the time (in seconds as
float) since the last command finished.  Other timers or process-filters
are ignored; that's not ideal but easily available.

>  (defun igc--predict-idle-time ()
> +  "Predict Emacs idle time available for GC when idle, using simple heuristics.
> +See `igc--on-idle'."
>    (* (igc--current-idle-time) 0.80))

This predicts the time until the next command starts.

The rest LGTM.

Helmut




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79918; Package emacs. (Mon, 01 Dec 2025 21:15:01 GMT) Full text and rfc822 format available.

Message #11 received at 79918 <at> debbugs.gnu.org (full text, mbox):

From: Jeremy Bryant <jb <at> jeremybryant.net>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 79918 <at> debbugs.gnu.org
Subject: Re: bug#79918: [PATCH] ; * lisp/emacs-lisp/igc.el: Add docstrings
 and fix typos
Date: Mon, 01 Dec 2025 21:13:39 +0000
[Message part 1 (text/plain, inline)]
Helmut Eller <eller.helmut <at> gmail.com> writes:

> On Sun, Nov 30 2025, Jeremy Bryant wrote:
>
>> Here is a patch to add docstrings and fix typos.
>>
>> WDYT?
> [...]
>>  (defun igc--current-idle-time ()
>> +  "Current idle time available for GC when idle.
>> +See `igc--on-idle'."
>>    (let ((idle-time (current-idle-time)))
>>      (if idle-time (float-time idle-time) 0)))
>
> The idea is that igc--current-idle-time is the time (in seconds as
> float) since the last command finished.  Other timers or process-filters
> are ignored; that's not ideal but easily available.
>
>>  (defun igc--predict-idle-time ()
>> +  "Predict Emacs idle time available for GC when idle, using simple heuristics.
>> +See `igc--on-idle'."
>>    (* (igc--current-idle-time) 0.80))
>
> This predicts the time until the next command starts.
>
> The rest LGTM.
>
> Helmut

OK, thanks Helmut, incorporating suggestions into the attached patch.

[0001-lisp-emacs-lisp-igc.el-Add-docstrings-and-fix-typos.patch (text/x-diff, attachment)]

This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.