GNU bug report logs - #40771
26.1: javascript-mode timers persist after closing mode buffers

Previous Next

Package: emacs;

Reported by: Boruch Baum <boruch_baum <at> gmx.com>

Date: Wed, 22 Apr 2020 15:44:01 UTC

Severity: normal

Found in version 26.1

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40771 in the body.
You can then email your comments to 40771 AT debbugs.gnu.org in the normal way.

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

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


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#40771; Package emacs. (Wed, 22 Apr 2020 15:44:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Boruch Baum <boruch_baum <at> gmx.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 22 Apr 2020 15:44:01 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Emacs Bug Reporting <bug-gnu-emacs <at> gnu.org>
Subject: 26.1: javascript-mode timers persist after closing mode buffers
Date: Wed, 22 Apr 2020 11:43:09 -0400
Today, with no javascript mode buffer open, when running M-x
list-timers, two javascript-related timers appear:

   *       0.50        t jit-lock-context-fontify
   *      30.00        t js-gc

So, it looks like those timers aren't being properly killed. I have no
idea when I have ever opened a buffer in some form of javascript mode;
my emacs-uptime is 20+ days.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40771; Package emacs. (Mon, 27 Apr 2020 14:36:01 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 40771 <at> debbugs.gnu.org
Subject: Re: bug#40771: 26.1: javascript-mode timers persist after closing
 mode buffers
Date: Mon, 27 Apr 2020 10:35:17 -0400
Boruch Baum <boruch_baum <at> gmx.com> writes:

> Today, with no javascript mode buffer open, when running M-x
> list-timers, two javascript-related timers appear:
>
>    *       0.50        t jit-lock-context-fontify

I don't think this one is javascript-related.

>    *      30.00        t js-gc
>
> So, it looks like those timers aren't being properly killed. I have no
> idea when I have ever opened a buffer in some form of javascript mode;
> my emacs-uptime is 20+ days.

js.el has at top-level:

    (run-with-idle-timer 30 t #'js-gc)

It's a global timer which isn't connected to any particular buffer.  I'm
not sure why you think the timer should be killed.  Do you see any
problems coming from the existence of this timer?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40771; Package emacs. (Mon, 27 Apr 2020 14:53:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Noam Postavsky <npostavs <at> gmail.com>, Boruch Baum <boruch_baum <at> gmx.com>
Cc: 40771 <at> debbugs.gnu.org
Subject: Re: bug#40771: 26.1: javascript-mode timers persist after closing
 mode buffers
Date: Mon, 27 Apr 2020 17:52:00 +0300
On 27.04.2020 17:35, Noam Postavsky wrote:
> It's a global timer which isn't connected to any particular buffer.

It *could* be tied to inferior-moz-buffer, which the timer has to use.

More importantly, MozRepl has been dead as a project for a number of 
years, since Firefox has removed the required functionality.

So me might as well remove all the associated code.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40771; Package emacs. (Wed, 29 Apr 2020 03:59:02 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 40771 <at> debbugs.gnu.org
Subject: Re: bug#40771: 26.1: javascript-mode timers persist after closing
 mode buffers
Date: Tue, 28 Apr 2020 23:58:23 -0400
On 2020-04-27 10:35, Noam Postavsky wrote:
> Boruch Baum <boruch_baum <at> gmx.com> writes:
> >    *       0.50        t jit-lock-context-fontify
>
> I don't think this one is javascript-related.

Oops. You're quite right on that one.

> >    *      30.00        t js-gc
> It's a global timer which isn't connected to any particular buffer.  I'm
> not sure why you think the timer should be killed.

It's associated with file js.el "Major mode for editing JavaScript", so
if no buffer is using that major mode, or more charitably if no buffer
is editing javascript, then the timer is cruft.

>  Do you see any problems coming from the existence of this timer?

I'm not sure. The immediate reason I bothered to perform M-x list-timers
was trouble I had killing the scrolling ticker of newsticker.el. The
reason I killed the two timers was to see if doing so would stop my
emacsclient process from intermittently freezing. I've been having a
recurring problem with that, on average once every few weeks: the server
process remains functional, so I don't lose any work or data, but I need
to kill the emacsclient process and re-connect to the server.

In any event, the metric shouldn't be whether anyone "sees any problems
coming from its existence", the metric should be whether its continued
existence is good software engineering practice. Likewise for Dmitry
Gutov's suggestion to remove code associated with MozRepl.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40771; Package emacs. (Wed, 29 Apr 2020 04:04:02 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 40771 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>
Subject: Re: bug#40771: 26.1: javascript-mode timers persist after closing
 mode buffers
Date: Wed, 29 Apr 2020 00:02:37 -0400
On 2020-04-27 17:52, Dmitry Gutov wrote:
> On 27.04.2020 17:35, Noam Postavsky wrote:
> More importantly, MozRepl has been dead as a project for a number of years,
> since Firefox has removed the required functionality.
>
> So me might as well remove all the associated code.

+1. Should this be a separate ticket / bug report, or can it just be
done on the basis of this one?

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40771; Package emacs. (Wed, 29 Apr 2020 04:11:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 40771 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>
Subject: Re: bug#40771: 26.1: javascript-mode timers persist after closing
 mode buffers
Date: Wed, 29 Apr 2020 07:10:49 +0300
On 29.04.2020 07:02, Boruch Baum wrote:
> +1. Should this be a separate ticket / bug report, or can it just be
> done on the basis of this one?

This one should be fine, thanks.

There's nothing else to do here anyway.




Added tag(s) pending. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 18 Sep 2021 14:36:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40771; Package emacs. (Sat, 18 Sep 2021 14:38:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 40771 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>,
 Boruch Baum <boruch_baum <at> gmx.com>
Subject: Re: bug#40771: 26.1: javascript-mode timers persist after closing
 mode buffers
Date: Sat, 18 Sep 2021 16:37:32 +0200
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> More importantly, MozRepl has been dead as a project for a number of
> years, since Firefox has removed the required functionality.
>
> So me might as well remove all the associated code.

I've now ripped out all the mozrepl stuff from js.el, but I think I'll
wait until Emacs 29 is opened before pushing -- MozRepl was removed from
Firefox in 2017, so perhaps a four year interim is slightly too short a
time to remove the support from Emacs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40771; Package emacs. (Sat, 18 Sep 2021 20:45:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 40771 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>,
 Boruch Baum <boruch_baum <at> gmx.com>
Subject: Re: bug#40771: 26.1: javascript-mode timers persist after closing
 mode buffers
Date: Sat, 18 Sep 2021 23:43:50 +0300
On 18.09.2021 17:37, Lars Ingebrigtsen wrote:
> Dmitry Gutov<dgutov <at> yandex.ru>  writes:
> 
>> More importantly, MozRepl has been dead as a project for a number of
>> years, since Firefox has removed the required functionality.
>>
>> So me might as well remove all the associated code.
> I've now ripped out all the mozrepl stuff from js.el, but I think I'll
> wait until Emacs 29 is opened before pushing -- MozRepl was removed from
> Firefox in 2017, so perhaps a four year interim is slightly too short a
> time to remove the support from Emacs.

Good idea.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40771; Package emacs. (Mon, 04 Oct 2021 09:57:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 40771 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>,
 Boruch Baum <boruch_baum <at> gmx.com>
Subject: Re: bug#40771: 26.1: javascript-mode timers persist after closing
 mode buffers
Date: Mon, 04 Oct 2021 11:56:41 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I've now ripped out all the mozrepl stuff from js.el, but I think I'll
> wait until Emacs 29 is opened before pushing -- MozRepl was removed from
> Firefox in 2017, so perhaps a four year interim is slightly too short a
> time to remove the support from Emacs.

I've now pushed this to the trunk, and I'm therefore closing this bug
report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 40771 <at> debbugs.gnu.org and Boruch Baum <boruch_baum <at> gmx.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 04 Oct 2021 09:57:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 01 Nov 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 175 days ago.

Previous Next


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