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

dune runtest --no-buffer and Emacs's next-error #3953

Closed
backtracking opened this issue Nov 16, 2020 · 5 comments
Closed

dune runtest --no-buffer and Emacs's next-error #3953

backtracking opened this issue Nov 16, 2020 · 5 comments
Assignees

Comments

@backtracking
Copy link

I'm using Emacs to edit OCaml code and I'm continuously running dune runtest through Emacs's compile command whenever I make some change in my code (as I've done for years before switching from Makefiles to dune recently).

It happens that I'm having a possibly large output and thus I had to add the --no-buffer option in order for the output to appear in Emacs's compilation buffer. But then, if there is some error in my code, I can't use Emacs's next-error anymore, as there is a missing newline before the compiler error message:

dune runtest --no-buffer
Done: 14/19 (jobs: 1)File "cfrac.ml", line 293, characters 40-46:
293 |     | Nil, Cons _ -> Sure (if even then true 1 else -1)

This prevents Emacs from identifying the file/line/column (it uses a regular expression that starts at the beginning of the line). Without --no-buffer, there is no such issue.

Of course, I could first run dune build, where I can do next-error, and then dune runtest --no-buffer, but the point is to systematically run the very same (and single) command "compile and rerun tests".

If you could do anything about it, that would be great.

I'm using dune 2.6.2 with OCaml 4.09.1 on Linux Ubuntu 18.04.

(And thanks for dune, it's great!)

@nojb
Copy link
Collaborator

nojb commented Nov 16, 2020

I believe this has been fixed in #3767 (not yet released, but available from master). If you give it a try, let us know if it indeed fixes your problem.

@nojb nojb self-assigned this Nov 16, 2020
@backtracking
Copy link
Author

Great, thanks!
(I looked in the issues first but missed it; most likely because I was using Emacs as a keyword.)

@nojb
Copy link
Collaborator

nojb commented Nov 20, 2020

Hello, I'm coming back to this because I think what I said about this "being fixed" actually refers to a different issue and won't help you.

Instead, wht you can do is to pass the flag --display quiet when launching dune from emacs. This will suppress the progress meter.

@backtracking
Copy link
Author

I tried and it works fine. Thanks for the tip!

@nojb
Copy link
Collaborator

nojb commented Nov 20, 2020

No problem!

@nojb nojb closed this as completed Nov 20, 2020
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

2 participants