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

M-. failure #225

Open
vzaliva opened this issue Sep 27, 2019 · 6 comments · Fixed by #226
Open

M-. failure #225

vzaliva opened this issue Sep 27, 2019 · 6 comments · Fixed by #226

Comments

@vzaliva
Copy link
Contributor

vzaliva commented Sep 27, 2019

Pressing M-. on definition fails with error "company-coq--get-comment-region: Symbol’s function definition is void: coq-find-comment-start"

@Isweet
Copy link

Isweet commented Oct 3, 2019

I'm also getting this error.

OSX Version 10.14.6
Emacs Version 26.2
Coq Version 8.9.1
Proof General Version 20190821.848
Company-Coq Version 20190425.1851

@vzaliva
Copy link
Contributor Author

vzaliva commented Nov 15, 2019

It started happening again

@cpitclaudel cpitclaudel reopened this Nov 16, 2019
@cpitclaudel
Copy link
Owner

OK, I'll take a look at getting a better fix this week-end

@vzaliva
Copy link
Contributor Author

vzaliva commented Nov 16, 2019

thanks! It is really annoyng bug as it is very common functionality used often.

@vzaliva
Copy link
Contributor Author

vzaliva commented Dec 4, 2019

I did some additional digging, and functions coq-find-comment-start and coq-find-comment-end are commented out in current MELPA version (20191007.1041) of proof general's coq-indent.el ( https://github.com/ProofGeneral/PG/blob/master/coq/coq-indent.el#L284 ).

@vzaliva
Copy link
Contributor Author

vzaliva commented Dec 5, 2019

Currently, this works, fixed by ProofGeneral/PG#444
However, they had a suggestion:

Probably a better option is to fix company-coq so it uses
syntax-ppss and forward-comment instead. E.g.

    (let ((ppss (syntax-ppss))) (when (nth 4 ppss) (nth 8 ppss))))

will return the position of the beginning of the comment if you're
inside a comment or nil otherwise. And (forward-comment 1) will jump
from the beginning of a comment to its end.

I leave this issue open for now. If you do not plan to implement this suggestion and happy with current mechanism, feel free to close it.

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 a pull request may close this issue.

3 participants