Isso tem a ver com minhas opções definidas no Emacs.
(defun run-latexmk ()
(interactive)
(let ((TeX-save-query nil)
(TeX-process-asynchronous nil)
(master-file (TeX-master-file)))
(TeX-save-document "")
(TeX-run-TeX "latexmk"
(TeX-command-expand "latexmk -pdflatex='pdflatex -file-line-error
-synctex=1' -pdf %O %S" 'TeX-master-file)
master-file))
(if (plist-get TeX-error-report-switches (intern master-file))
(TeX-next-error t)
(progn
(demolish-tex-help)
(minibuffer-message "latexmk: done."))))
Original eu tinha %o %s
. Tem que ser capital O
e S
.