-
Notifications
You must be signed in to change notification settings - Fork 88
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: make printing parentheses flag accessible #785
Conversation
I would have preferred C-c C-a C-( and C-c C-a C-) as keybinding, but those keys are already taken. On the other hand C-9 is much easier to type than C-(, of course accepting the discrimination of (at least) the German keyboard users (where the parentheses are on 8 and 9 ;-). |
@sertel: Is this (part of) what you were missing in PG? |
Yes, but also for toggling the |
Are you fine with a menu entry only? Otherwise, do you have a suggestion for a keybinding with the C-c C-a prefix? (Already taken are: C-a, C-b, C-c, TAB, C-l, RET, C-n, C-o, C-p, C-q, C-r, C-s, C-t, C-w, !, [, g, h, r, t, C-SPC, C-(, C-), C-0, C-9, |
Now with notations. I defined n and N as keybindings, because C-n is already taken for locate notation. |
On this feature: there is already a way to send a command to Coq enclosed inside a If you don't know this feature try to hit Example: Lemma foo: forall n:nat, n = n.
Proof. then hit |
sorry had to edit the shortcut at the end. |
OK, didn't know that. I saw the other toggles for implicit, coercions, and so on, and thought parenthesis and notations were forgotten there. Extending the wrapper mechanism is a nice proposal, I am open to this. |
For extending the wrapper, I have the following remarks.
|
Indeed. this should be easy to fix.
A solution would be that
Indeed this needs some work to be compatible with this PR. |
Most of the time I want to investigate the current goal including the context with notations turned off. I'm not sure how relevant the key binding would be for because I'm using Spacemacs and hence would specifying something like |
I never used spacemacs but it seems to also accept prefix args: type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Merging this in a few hours if noone objects. |
I like the idea to extend the wrapping mechanism, if a suitable completion works. I briefly looked into completion and only found completion commands that support to select one item out of a set or list. However, what we need here is completion to select a subset from a set (or a sublist from a list). This sounds like a nice Emacs hacking challenge, but it will take a while... |
Add menu entry and Coq keymap binding available to set/unset the Printing Parentheses and Printing Notations flags.
On the wrapper: |
Add menu entry and Coq keymap binding available to set/unset the Printing Parentheses flag.