unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40771: 26.1: javascript-mode timers persist after closing mode buffers
@ 2020-04-22 15:43 Boruch Baum
  2020-04-27 14:35 ` Noam Postavsky
  0 siblings, 1 reply; 9+ messages in thread
From: Boruch Baum @ 2020-04-22 15:43 UTC (permalink / raw)
  To: 40771

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#40771: 26.1: javascript-mode timers persist after closing mode buffers
  2020-04-22 15:43 bug#40771: 26.1: javascript-mode timers persist after closing mode buffers Boruch Baum
@ 2020-04-27 14:35 ` Noam Postavsky
  2020-04-27 14:52   ` Dmitry Gutov
  2020-04-29  3:58   ` Boruch Baum
  0 siblings, 2 replies; 9+ messages in thread
From: Noam Postavsky @ 2020-04-27 14:35 UTC (permalink / raw)
  To: Boruch Baum; +Cc: 40771

Boruch Baum <boruch_baum@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?





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#40771: 26.1: javascript-mode timers persist after closing mode buffers
  2020-04-27 14:35 ` Noam Postavsky
@ 2020-04-27 14:52   ` Dmitry Gutov
  2020-04-29  4:02     ` Boruch Baum
  2021-09-18 14:37     ` Lars Ingebrigtsen
  2020-04-29  3:58   ` Boruch Baum
  1 sibling, 2 replies; 9+ messages in thread
From: Dmitry Gutov @ 2020-04-27 14:52 UTC (permalink / raw)
  To: Noam Postavsky, Boruch Baum; +Cc: 40771

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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#40771: 26.1: javascript-mode timers persist after closing mode buffers
  2020-04-27 14:35 ` Noam Postavsky
  2020-04-27 14:52   ` Dmitry Gutov
@ 2020-04-29  3:58   ` Boruch Baum
  1 sibling, 0 replies; 9+ messages in thread
From: Boruch Baum @ 2020-04-29  3:58 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 40771

On 2020-04-27 10:35, Noam Postavsky wrote:
> Boruch Baum <boruch_baum@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#40771: 26.1: javascript-mode timers persist after closing mode buffers
  2020-04-27 14:52   ` Dmitry Gutov
@ 2020-04-29  4:02     ` Boruch Baum
  2020-04-29  4:10       ` Dmitry Gutov
  2021-09-18 14:37     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 9+ messages in thread
From: Boruch Baum @ 2020-04-29  4:02 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 40771, Noam Postavsky

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#40771: 26.1: javascript-mode timers persist after closing mode buffers
  2020-04-29  4:02     ` Boruch Baum
@ 2020-04-29  4:10       ` Dmitry Gutov
  0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Gutov @ 2020-04-29  4:10 UTC (permalink / raw)
  To: Boruch Baum; +Cc: 40771, Noam Postavsky

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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#40771: 26.1: javascript-mode timers persist after closing mode buffers
  2020-04-27 14:52   ` Dmitry Gutov
  2020-04-29  4:02     ` Boruch Baum
@ 2021-09-18 14:37     ` Lars Ingebrigtsen
  2021-09-18 20:43       ` Dmitry Gutov
  2021-10-04  9:56       ` Lars Ingebrigtsen
  1 sibling, 2 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-18 14:37 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 40771, Noam Postavsky, Boruch Baum

Dmitry Gutov <dgutov@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#40771: 26.1: javascript-mode timers persist after closing mode buffers
  2021-09-18 14:37     ` Lars Ingebrigtsen
@ 2021-09-18 20:43       ` Dmitry Gutov
  2021-10-04  9:56       ` Lars Ingebrigtsen
  1 sibling, 0 replies; 9+ messages in thread
From: Dmitry Gutov @ 2021-09-18 20:43 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 40771, Noam Postavsky, Boruch Baum

On 18.09.2021 17:37, Lars Ingebrigtsen wrote:
> Dmitry Gutov<dgutov@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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#40771: 26.1: javascript-mode timers persist after closing mode buffers
  2021-09-18 14:37     ` Lars Ingebrigtsen
  2021-09-18 20:43       ` Dmitry Gutov
@ 2021-10-04  9:56       ` Lars Ingebrigtsen
  1 sibling, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-04  9:56 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 40771, Noam Postavsky, Boruch Baum

Lars Ingebrigtsen <larsi@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-10-04  9:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 15:43 bug#40771: 26.1: javascript-mode timers persist after closing mode buffers Boruch Baum
2020-04-27 14:35 ` Noam Postavsky
2020-04-27 14:52   ` Dmitry Gutov
2020-04-29  4:02     ` Boruch Baum
2020-04-29  4:10       ` Dmitry Gutov
2021-09-18 14:37     ` Lars Ingebrigtsen
2021-09-18 20:43       ` Dmitry Gutov
2021-10-04  9:56       ` Lars Ingebrigtsen
2020-04-29  3:58   ` Boruch Baum

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).