Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tuareg-interactive-filter not seeing any output? #248

Closed
progman1 opened this issue Mar 29, 2021 · 1 comment
Closed

tuareg-interactive-filter not seeing any output? #248

progman1 opened this issue Mar 29, 2021 · 1 comment

Comments

@progman1
Copy link

progman1 commented Mar 29, 2021

tuareg-interactive--send-region sends text with comint-send-string then follows up
with comint-send-input.
the latter runs the comint-output-filter-functions hook a member of which is
tuareg-interactive-filter. which amongst other things looks for errors.

at least on my system the delay between running comint-send-string and comint-send-input
is not sufficient to see a response from the ocaml interpreter, so tuareg-interactive-filter
never sees any change in the buffer point and so never notices errors (or does anything else).

it appears comint-send-string is asynchronous so it seems odd that tuareg-interactive--send-region should even attempt to run comint-send-input afterwards.

while comint-send-input will lead to a call to tuareg-interactive-filter, comint-output-filter also does so it's noteworthy that comint uses it with set-process-filter to intercept process output synchronously. tuareg does not use this method, relying on the hook instead.
this difference, asynchronous vs synchronous handling of the output, I think accounts for the problem. what do you think?

@progman1 progman1 changed the title tuareg-interactive-filter never not seeing any output? tuareg-interactive-filter not seeing any output? Mar 29, 2021
@progman1
Copy link
Author

progman1 commented Mar 29, 2021

ah, comint-output-filter is attached!
the problem was simply a change in the printing of compiler locations in 4.11,
"Line x, characters y-z ..." not being recognised by tuareg.

('close issue' doesn't seem to be closing the issue!)

mattiase added a commit to mattiase/tuareg that referenced this issue Sep 3, 2021
Translate to `rx` notation and extend it to accept error messages
emitted by current OCaml compilers, with both line and char ranges.

This probably fixes ocaml#248.
mattiase added a commit to mattiase/tuareg that referenced this issue Sep 4, 2021
Translate to `rx` notation and extend it to accept error messages
emitted by current OCaml compilers, with both line and char ranges.

This probably fixes ocaml#248.
mattiase added a commit to mattiase/tuareg that referenced this issue Sep 4, 2021
Translate to `rx` notation and extend it to accept error messages
emitted by current OCaml compilers, with both line and char ranges.

This probably fixes ocaml#248.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant