Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9243977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:55:27+00:00 2026-06-18T08:55:27+00:00

In LaTeX mode C-c C-c is bound to: (TeX-command-master &optional OVERRIDE-CONFIRM) Normally this interactive

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:55:28+00:00Added an answer on June 18, 2026 at 8:55 am

    Build & view

    Again, this solution, instead of modifying the behaviour of the TeX-command-master, rewrites it. The rewritten version of the command, named build-view, follows a rather straightforward logic.

    1. If the LaTeX file buffer is not-modified, it runs the default viewer;
    2. If the buffer is dirty, it runs the default LaTeX compiler and, after the build, opens the output in the default viewer.

    Here’s the code:

    (defun build-view ()
      (interactive)
      (if (buffer-modified-p)
          (progn  
        (let ((TeX-save-query nil)) 
        (TeX-save-document (TeX-master-file)))
        (setq build-proc (TeX-command "LaTeX" 'TeX-master-file -1))
        (set-process-sentinel  build-proc  'build-sentinel))
        (TeX-view)))
    
    (defun build-sentinel (process event)    
      (if (string= event "finished\n") 
          (TeX-view)
        (message "Errors! Check with C-`")))
    

    You can now type M-x build-view and start the told build-view process or associate it with a new keybinding such as “F2”:

    (add-hook 'LaTeX-mode-hook '(lambda () (local-set-key (kbd "<f2>") 'build-view)))
    

    Note: As suggested by Tyler, TeX-save-query variable is changed locally, therefore the old C-c C-c/ TeX-command-master is unaffected and will keep asking confirmations.

    Do edit this code to make it better or easier to read!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the latex-mode, we can make a tex file to fill it with all
I use the following function from Latex, Emacs: automatically open *TeX Help* buffer on
I keep auto-fill-mode enabled by default for all LaTeX files. This is usually nice,
In Org-mode you can make comments and from Org-mode you can export to LaTeX
When editing an Sweave document in LaTeX (using the Noweb mode), Emacs knows to
Does LaTeX handle situation when a .bib file has different encoding than .tex file?
I would like to have my yasnippets for Latex mode to be available for
I have an extensive emacs configuration. Unfortunately, auto-fill-mode is broken within LaTeX-mode for some
How to check whether the character before point equals \ (defun comment-latex () (interactive)
I'm trying to rewrite some document from latex in org-mode. What I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.