Following solution is used to compile current buffer that is a LaTeX file:
(defun my-run-latex () "Save all buffers and run LaTeX on the current master." (interactive) (let* ((inhibit-message t) (TeX-command-force "LaTeX") (TeX-clean-confirm t) (TeX-save-query nil) (master (TeX-master-file)) (process (and (stringp master) (TeX-process master)))) (TeX-save-document master) (when (and (processp process) (eq (process-status process) 'run)) (delete-process process)) (TeX-command-master)))
When I apply M-x my-run-latex, I am able to compile the latex file. But when it is first applied, I see the following lines in the minibuffer:
When I ENTER it continues compiling. Afterwards when I apply M-x my-run-latex, the Master file: line in the minibuffer does not show up and it compiles right away.
Is it possible to prevent Master file: line to show up in the minibuffer when M-x my-run-latex is first called?

TeX-mastertotin the init file. ;-) (Or, rather, don't unset it, sincetis the default). – gusbrs Mar 24 '22 at 15:44(setq-default TeX-master t)does the job? – alper Mar 24 '22 at 22:26tis the default, you'd better search your configuration for who is setting it otherwise. And if you set it totand whatever does otherwise comes later, you'd still be overridden. – gusbrs Mar 24 '22 at 22:29(setq-default TeX-master nil)in my init.el file, had no idea that will cause this. Thanks :-) – alper Mar 24 '22 at 22:31