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?

alper
  • 1,370
  • 1
  • 13
  • 35

1 Answers1

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.

C4ffeine Add1ct
  • 492
  • 3
  • 10
  • 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 '22 at 09:05