I would like to use latexmk to compile my LaTeX documents in Emacs. Especially I need the Emacs functionality next-error, which is typically called with C-x `,
next-error
Adding %(mode) gives latexmk some more options like noninteractive if it is set so in auctex.
(add-hook 'LaTeX-mode-hook (lambda () (push '("Latexmk" "latexmk -pdf %(mode) %s" TeX-run-TeX nil t :help "Run Latexmk on file") TeX-command-list)))