Comments (7)
@RalfJung Cc @ProofGeneral/core
just FYI, the implementation addressing this feature request is now available in MELPA,
and I tweeted an announcement: https://twitter.com/ErikMartinDorel/status/1620037817660473344
from pg.
if there was a command that behave almost like C-c C-Enter, but with skipping proofs, then I would leave the "omit proofs" flag off usually (so that C-c C-Enter, C-c C-b, and so on all do not omit proofs).
Thanks a lot @RalfJung for your testing and feedback!
Good news: in proof-general 4.5, there's already (almost!) the feature you are interested in:
- You can enable the "omit proof" feature by default,
manually by the menu or doingM-: (proof-omit-proofs-option-toggle 1) RET
- and then, add a prefix argument at the time you want to disable the feature and run all opaque proofs,
i.e. just runC-u C-c C-RET
orC-u C-c C-b
However, I realize that having the prefix argument the other way around (disabling "omit proofs" by default), or conversely, namely, like a real "Boolean toggle", could be nice.
→ I just opened PR #683, hopefully this can be integrated in master soon if this looks good as well to @hendriktews (the author of the omit proofs feature)
from pg.
I didn't know about C-u
, that already works very nicely. :) I haven't thought deeply about which one I want to be the default (C-c C-RET), so for now I will see how "omit by default, C-u for full checking" works for me. Thanks!
from pg.
from pg.
Yeah that's a good question. I don't re-read the manual after each git pull
, obviously... I didn't even know "omit proofs" existed until Tej pointed it out to me. The PG 4.5 release notes mention it but that was way after I started using the feature.
To be fair though, looking at the PG 4.5 release notes, it mentions "omit proofs" but doesn't indicate the existence of C-u
. If I don't even suspect a feature might exist, then obviously I will not go search the manual for it. I could recommend linking to that section of the documentation from the release notes, but in this particular case I am not sure if it would have helped.
from pg.
In terms of the documentation itself:
With a prefix argument, both proof-goto-point and proof-process-buffer will temporarily disable the omit proofs feature and send the full proof script to Coq.
Maybe it is my lack of emacs knowledge, but this tells me nothing. I have no clue what a "prefix argument" is. Quick googling helps, but it would also be good to just say that this means one has to do C-u C-c C-RET
etc.
from pg.
FYI @RalfJung, here is the documentation of the standard emacs keybinding C-u
(displayed by C-h k C-u
):
universal-argument is an interactive and byte-compiled function
defined in simple.el.gz.
Signature
(universal-argument)
Documentation
Begin a numeric argument for the following command.
Digits or minus sign following C-u make up the numeric argument.
C-u following the digits or minus sign ends the argument.
C-u without digits or minus sign provides 4 as argument.
Repeating C-u without digits or minus sign
multiplies the argument by 4 each time.
For some commands, just C-u by itself serves as a flag
that is different in effect from any particular numeric argument.
These commands include C-SPC and M-x start-kbd-macro.
Key Bindings
global-map C-u
To sum up, it is useful to:
- repeat some characters (try
C-u 64 *
or what it amounts to the same,C-u C-u C-u *
, as 64=4×4×4) - pass some arguments to functions, see also https://www.gnu.org/software/emacs/manual/html_node/elisp/Prefix-Command-Arguments.html for details.
from pg.
Related Issues (20)
- whitelist for admissible commands inside proofs HOT 17
- PG incorrectly interprets `}.` as a single token, which results in incorrectly accepting files that coqc rejects
- test_wholefile.v incompatible with 8.17 HOT 1
- Scheme ... with is indented improperly HOT 1
- Merging the Abella fork of PG HOT 10
- Automatic indenting for Easycrypt HOT 1
- generic/pg-goals.el shouldn't be executable HOT 1
- confusing error on incorrect _CoqProject file
- Colors don't work in emacs-nox HOT 1
- Compile-before-require setting does not presist HOT 1
- `coq-insert-suggested-dependency` sometimes inserts unparsable statements
- test_wholefile.v incompatible with 8.19 HOT 4
- makeinfo reports warning: @inforef is obsolete
- compile-tests/003-require-error fails sporadically with 8.19-rc1 HOT 4
- Build failure when "Compile Before Require" meets imported OCaml plugins HOT 13
- proof-goto-point is non-idempotent HOT 2
- wait for proof-goto-point to finish HOT 1
- void function error
- coq-load-project file should extract META files HOT 1
- dynamic highlighting HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pg.