When I save a LaTeX
file, I want to compile it as well on the background. In order to achieve it I have done following module:
(defun my-run-latex ()
(interactive)
(save-all)
(setq TeX-command-force "LaTeX")
(setq TeX-clean-confirm t)
(TeX-command-master))
(add-hook 'LaTeX-mode-hook (lambda ()
(local-set-key (kbd "C-x C-s") 'my-run-latex)))
But when I do that I keep having following message:
Please answer y or n. Process `LaTeX' for document `program' running, kill it? (y or n)
What may be the reason for this message? Is it possible to ignore it or automatically confirm it via y
?