-
Notifications
You must be signed in to change notification settings - Fork 700
Add configurable shortcuts for user queries to CoqIDE. #67
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
Conversation
|
Do you know you can press F1 to open the query pane, and write there Show Proof? |
|
I did not know that! Thanks for the tip, that will be way better indeed. |
|
Personally, I'm also missing a quick way to do Show Proof in coqide. After all, only half of the template-query space is in use, so we don't have to refrain ourself of populating it with most common queries. |
|
What do you mean by half? The template menu is already too huge. The query one is indeed short. To my understanding what @cmangin was asking for is a key binding for Show Proof, not just an entry in one of the drop down menus. IIRC, F1+RETURN should pretty much behave as "run last query". If not, we could add a shortcut for that as a sort of "meta shortcut" for the favorite, non already key-bound, query of any user. |
|
What I'm asking for is also a key binding for Show Proof (optionally with an entry in the query menu so that we can remember what is the key). Maybe this is not an enough general-purpose request, and the question of not cluttering the menu is then relevant. I could live with a key which is not explicitly public (but then I'm sure some users will tell that we are hiding features). I use Show Proof for various reasons. Often maybe just for developing purpose (what some high-level feature or tactic produced as a proof term). Sometimes to compare differences in the proof built when debugging a proof which behave differently from a version of Coq to another. Sometimes to be sure that what a tactic does is what I intend it does. Sometimes to understand the proof. Sometimes to see what refine has inferred alone. Actually, I don't know always why. I'm just used to use it. |
|
I also use Show Proof quite often, mainly when I'm trying to understand what went wrong when building a proof term with an OCaml tactic, or to do a proof with tactics and then try to simplify it manually. Another idea could be to just add the possibility to add user-defined queries/shortcuts. To make things simple, it would be easy to restrict it to queries without arguments. |
|
I don't use CoqIDE frequently, but I would be in favor of being able to customize keybindings to arbitrary queries. |
|
In theory GTK+ applications are able to let the use assign a key binding to any menu entry:
The first option requires the menu entry to exist, but not necessarily to have a shortcut. |
|
Should Show proof be in some right click menu? It is a contextual P. 2015-07-01 23:19 GMT+02:00 Hugo Herbelin [email protected]:
|
|
Hi, Afaik it works in some cases at least, I use this feature to rebind
|
|
I made an attempt at user-queries, do you want me to update this PR, or to open another one, since the feature is different? |
|
test build |
|
Following @herbelin's advice, I have updated this branch with this feature. A few more detailed comments:
Any of these points is open to discussion and any comment is welcome, of course. |
|
I just tried the patch. I could add "Show Proof" to the view menu but did not manage to add a binding (I tried W but it did not seem to have had an effect). The interface looks however a bit complicated to me: without explanation in the preference:User queries tab on the syntax of modifiers, on not being able to add arguments, on the need to restart (but 8.6 will be ok iiuc). I have nothing against adding more configurability and extensibility of bindings (1), on the contrary, but I feel it starts to be a different project than the initial simple objective (2) to have a "Show Proof" menu or binding or right-click directly available by default. So, maybe I'm wrong, but it looks to me there are still two relatively independent requests: (2) which is specific and simple and (1) which would require more work so that it is well put together (some help, format of coqide.keys, ...). And I would certainly be ok with both! |
|
I've tried it out, it works. I'd suggest to merge the "shortcuts" and "user queries" pages into a single one and make the query menu modifier configurable too (as the view, ..navigation ones) |
|
@gares: alright, I've implemented both suggestions (it was easy and quick anyway). I would still like to understand why it did not work for @herbelin. Also, about your concerns, I agree that this change is more general than the original one, but I think it is a better one, so I've just changed the name of the PR. (Edit: well, I just saw that there was a notice about restarting now, so I guess that's better.) |
I accidentally forgot to remove two lines from the previous [Show Proof.] feature...
Allow matching on arbitrary terms when specifying `return` type.
Make download links point to download page instead of GitHub
I find myself typing "Show Proof." a lot sometimes, and was wondering why there wasn't a shortcut for that. Maybe there is a reason?
Anyway, if there is none, here is a patch that adds this.