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

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.

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.