janestreet / janestreet/ecaml

Loading Ecaml breaks the echoing of unfinished keystrokes

Open
#14 2 comments 0 reactions 0 assignees View on GitHub
forwarded-to-js-devs
Dominant language
OCaml
Stars
286
Forks
13
PR merge metrics
No merged PRs in 30d

Description

By default, Emacs displays unfinished keystrokes in the echo area if the user types slow enough. This behavior is broken when loading Ecaml. The problem seems to come from the initialization code of Ecaml, more precisely the start of the `Async` scheduler:

https://github.com/janestreet/ecaml/blob/68fa60749bcf25ea2c1378a8fe2da0eb4f53bf45/src/async_ecaml.ml#L692

Moreover, shutting down the scheduler via `M-x ecaml-async-shutdown` restores the echoing of unfinished keystrokes.

The problem was observed using the latest version of both Ecaml (v0.15.0) and Emacs (28.2).

Contributor guide

Open the contributing guide

Research direction

Start at src/async_ecaml.ml around line 692, where the Async scheduler is initialized, and reproduce the issue in Emacs 28.2 with Ecaml v0.15.0 by typing unfinished keystrokes slowly. Compare the behavior while the scheduler is running with the behavior after M-x ecaml-async-shutdown. Done means Emacs again echoes unfinished keystrokes without requiring scheduler shutdown.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs, ocaml
Domain
desktop, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.