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

coq: run silently and explicitly Show when necessary #742

Closed
wants to merge 5 commits into from

Conversation

hendriktews
Copy link
Collaborator

This is a step towards fixing #568. It fixes the cases after Proof, comments and auto, leaving now 3 instead of 6 failing tests in ci/simple-tests/test-goals-present.el.

The first commit here breaks prooftree. More work is needed.

@hendriktews hendriktews force-pushed the silent branch 2 times, most recently from afc09c7 to 9821415 Compare March 8, 2024 09:51
This is a step towards fixing ProofGeneral#568. It fixes the cases after Proof,
comments and auto, leaving now 3 instead of 6 failing tests in
ci/simple-tests/test-goals-present.el.
- update manuals
- expect test goals-reset-after-admitted to fail again
- expect errors in tests 020_coq-test-definition,
  090_coq-test-regression-Fail and 091_coq-test-regression-Fail
- goals should be reset when there are no more goals (does work)
- goals should be reset after Qed (does not work)
Extend the goals present tests to additionally check that the response
buffer contains some text (i.e., an error message) in those cases
where an error is expected.
This commit fixes two more cases of ProofGeneral#568: The goals buffer is updated
in case of an error if Coq is inside a proof. Care is taken to keep
the error message in the response buffer and to show the response
buffer in two-pane mode.

The fix works by issuing a Show command as a priority action item from
proof-shell-handle-error-or-interrupt-hook, which runs at the end of
the error processing. The new action item flag 'keep-response tells
the generic machinery to not clear the response buffer and to keep it
in two-pane mode.
@hendriktews
Copy link
Collaborator Author

Hi @erikmd , @Matafou , @cpitclaudel ,
AFAICT, the difficult cases of PG not showing or showing incorrect goals are solved now. IIRC, the conclusion in #467 was that PG should run Coq completely in silent mode. This PR precisely does this. If you have an opinion on whether we should prefer the approach of this PR over the alternatives in #467 or #429, please tell! If you have some time to try this out, it would be nice to hear if this PR breaks other stuff.
What still needs to be done is clearing the goals after Qed and Admitted, I believe this is simple. What is harder is to get proof-tree to work again.

@hendriktews
Copy link
Collaborator Author

The approach used in this PR does not work for Search and Check commands. I'll start from scratch in a new PR.

@cpitclaudel
Copy link
Member

Thanks a lot for working on this @hendriktews ; I don't have anything smart to say on the implementation at this stage but I'm very glad that you're on it :)

@hendriktews hendriktews deleted the silent branch April 17, 2024 16:08
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

Successfully merging this pull request may close these issues.

2 participants