0

I am using following solution (https://emacs.stackexchange.com/a/65076/18414) to compile a LaTeX file:

(defun my-run-latex ()
  "Save all buffers and run LaTeX on the current master."
  (interactive)
  (let* ((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)))

After each time when I run my-run-latex function I keep seeing the following message in the minibuffer: Type ‘C-c C-l’ to display results of compilation.

Would it be possible to suppress this message?

1

1 Answer 1

1

If you want to disable display of all messages:

(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)))

Of course, you can set inhibit-message only on certain calls if you wanted to keep the message output of other calls.

1
  • Sorry for late comment. When I first run my-run-latex ; Master file: selection line shows up in the minibuffer. When I enter, it does not show up again and compiles right away. Is this a normal behavior?
    – alper
    Mar 24, 2022 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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