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

fix(coq.el): (setq proof-shell-strip-crs-from-input nil) #774

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

erikmd
Copy link
Member

@erikmd erikmd commented Jun 15, 2024

Related: #773

@hendriktews do you agree that we merge this ? (if the CI passes, of course)

@erikmd
Copy link
Member Author

erikmd commented Jun 17, 2024

If no one comments further, I will merge this PR in 4 working days (on Friday evening - June 21)

@hendriktews
Copy link
Collaborator

Fine with me.

@erikmd erikmd merged commit 99f91e8 into master Jun 19, 2024
250 checks passed
@erikmd erikmd deleted the coq-dont-strip-cr branch June 19, 2024 12:10
Matafou added a commit to Matafou/PG that referenced this pull request Jul 9, 2024
We cannot use the " ^^^ " thing to compute the error location because
commands are not stripped of newlines anymoire (ProofGeneral#774).

Solution: use the character position information with the following
subtleties

- position are given by coq **bytes** positions.

- position given by coq is the position from the previous "." fed to
  coq. I.e. we must be careful to strip any blank after the final "." of
  a command.
Matafou added a commit to Matafou/PG that referenced this pull request Jul 10, 2024
A test is also added to check the exact position of the error
highlighting.

Description of the fix.

We cannot use the " ^^^ " thing to compute the error location because
commands are not stripped of newlines anymoire (ProofGeneral#774).

Solution: use the character position information with the following
subtleties

- position are given by coq **bytes** positions.
- position given by coq is the position from the previous "." fed to
  coq. I.e. we must be careful to strip any blank after the final "." of
  a command.
Matafou added a commit to Matafou/PG that referenced this pull request Sep 2, 2024
A test is also added to check the exact position of the error
highlighting.

Description of the fix.

We cannot use the " ^^^ " thing to compute the error location because
commands are not stripped of newlines anymoire (ProofGeneral#774).

Solution: use the character position information with the following
subtleties

- position are given by coq **bytes** positions.
- position given by coq is the position from the previous "." fed to
  coq. I.e. we must be careful to strip any blank after the final "." of
  a command.

In the test we make the disappearing tuimeout of overlay bigger
so that tests don't fail on slow VMs  (maybe useless).

Coq-8.11 has a small glitch on positions, the test is compatible with
both behaviour.
Matafou added a commit to Matafou/PG that referenced this pull request Sep 4, 2024
Tests is also added to check the exact position of the error
highlighting.

Description of the fix.

We cannot use the " ^^^ " thing to compute the error location because
commands are not stripped of newlines anymore (ProofGeneral#774).

Solution: use the character position information given in the error
message with the following subtleties:

- position are given by coq **bytes** positions.
- position given by coq is the position from the previous "." fed to
  coq. I.e. we must be careful to strip any blank after the final "." of
  a command.
- Coq < 8.11 has a small glitch on positions, the test is compatible
  with both behaviour.
- coq <= 8.20 has a bug on position for curly braces.

In the test we make the disappearing timeout of overlay bigger
so that tests don't fail on slow VMs (maybe useless).
Matafou added a commit to Matafou/PG that referenced this pull request Sep 4, 2024
Tests is also added to check the exact position of the error
highlighting.

Description of the fix.

We cannot use the " ^^^ " thing to compute the error location because
commands are not stripped of newlines anymore (ProofGeneral#774).

Solution: use the character position information given in the error
message with the following subtleties:

- position are given by coq **bytes** positions.
- position given by coq is the position from the previous "." fed to
  coq. I.e. we must be careful to strip any blank after the final "." of
  a command.
- Coq < 8.11 has a small glitch on positions, the test is compatible
  with both behaviour.
- coq <= 8.20 has a bug on position for curly braces.

In the test we make the disappearing timeout of overlay bigger
so that tests don't fail on slow VMs (maybe useless).
Matafou added a commit to Matafou/PG that referenced this pull request Sep 5, 2024
Tests is also added to check the exact position of the error
highlighting.

Description of the fix.

We cannot use the " ^^^ " thing to compute the error location because
commands are not stripped of newlines anymore (ProofGeneral#774).

Solution: use the character position information given in the error
message with the following subtleties:

- position are given by coq **bytes** positions.
- position given by coq is the position from the previous "." fed to
  coq. I.e. we must be careful to strip any blank after the final "." of
  a command.
- Coq < 8.11 has a small glitch on positions, the test is compatible
  with both behaviour.
- coq <= 8.20 has a bug on position for curly braces.

In the test we make the disappearing timeout of overlay bigger
so that tests don't fail on slow VMs (maybe useless).
Matafou added a commit to Matafou/PG that referenced this pull request Sep 5, 2024
Tests is also added to check the exact position of the error
highlighting.

Description of the fix.

We cannot use the " ^^^ " thing to compute the error location because
commands are not stripped of newlines anymore (ProofGeneral#774).

Solution: use the character position information given in the error
message with the following subtleties:

- position are given by coq **bytes** positions.
- position given by coq is the position from the previous "." fed to
  coq. I.e. we must be careful to strip any blank after the final "." of
  a command.
- Coq < 8.11 has a small glitch on positions, the test is compatible
  with both behaviour.
- coq <= 8.20 has a bug on position for curly braces.

In the test we make the disappearing timeout of overlay bigger
so that tests don't fail on slow VMs (maybe useless).

NOTE: coq error locations are quite wrong when we insert
spaces (instead of a newline) after a command. PG was wrongly
inserting a space after Set Silent./ Unset Silent, which triggered
this problem. This is fixed by this PR. But other silent commends
should triped of trailing blanks. I leave it to another PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants