In LaTeX mode C-c C-c is bound to:
(TeX-command-master &optional OVERRIDE-CONFIRM)
Normally this interactive function runs a command, perhaps a LaTeX compilation, asking for confirmation.
In tex-buf.el it reads:
If a prefix argument OVERRIDE-CONFIRM is given, confirmation will
depend on it being positive instead of the entry in `TeX-command-list’.
This is a bit cryptic for me and reading C-h v TeX-command-list didn’t help.
How can I pass the prefix argument to “TeX-command-master” so that I avoid all the confirmation requests?
Build & view
Again, this solution, instead of modifying the behaviour of the
TeX-command-master, rewrites it. The rewritten version of the command, namedbuild-view, follows a rather straightforward logic.Here’s the code:
You can now type
M-x build-viewand start the told build-view process or associate it with a new keybinding such as “F2”:Note: As suggested by Tyler,
TeX-save-queryvariable is changed locally, therefore the oldC-c C-c/TeX-command-masteris unaffected and will keep asking confirmations.Do edit this code to make it better or easier to read!