When I update my document and compile it, I will experience as follows:

Save file /home/*****/test2.tex? (y or n)  y
command: (default LaTeX) LateX

I want them to perform default. And not show those two lines. How can I do that? Thank you very much.

  • 1
    These are two different questions, really. It would be easiest to just define a new function to save the current buffer and run TeX-command-master immediately afterward. – Sean Allred Aug 11 '15 at 18:22
  • By the way, you can just press enter (or C-m) for the second one. – Sean Allred Aug 11 '15 at 18:28
  • @SeanAllred Yes, that's what I do, press Y and then enter. But what I want is that it can automatically compile without any confirmation when I just use C-c C-c. – yuxuan Aug 11 '15 at 19:18
(defun yuxuan-save-and-compile (extended)
  "Save and run the default command.
With a prefix argument, just run `TeX-command-master'."
  (interactive "P")
  (if extended (call-interactively #'TeX-command-master)
    (TeX-command TeX-command-default #'TeX-master-file nil)))

Bind to whatever key you think is appropriate. With a prefix argument, this will call the normal command for C-c C-c, TeX-command-master.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.