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,238
  • 11
  • 30
  • 2
    Does this answer your question? [How to suppress \`Wrote /home/user/.emacs.d/recentf\` message in minibuffer](https://emacs.stackexchange.com/questions/68146/how-to-suppress-wrote-home-user-emacs-d-recentf-message-in-minibuffer) – NickD Sep 17 '21 at 23:31

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
  • 460
  • 3
  • 8
  • 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