[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] TeX-run-Tex wrong type argument

From: Adam
Subject: [AUCTeX] TeX-run-Tex wrong type argument
Date: Mon, 14 May 2012 11:26:59 +0000 (UTC)
User-agent: Loom/3.14 (


I use such a function for compiling LaTeX in emacs (AUCTeX) taken from (accepted answer by Jouni K. 

    (defun run-latexmk ()
      (let ((TeX-save-query nil)
            (TeX-process-asynchronous nil)
            (master-file (TeX-master-file)))
        (TeX-save-document "")
        (TeX-run-TeX "latexmk" "latexmk" master-file)
        (if (plist-get TeX-error-report-switches (intern master-file))
            (TeX-next-error t)
          (minibuffer-message "latexmk done"))))

It works really well but I observed some problem when I compile a multifile

I have some master.tex and \input{chap1.tex} in it. When I use run-latexmk
while editing chap1.tex (master file is properly set in chap1.tex) then
I get a message

    TeX-run-TeX: Wrong type argument: stringp, nil.

Output pdf/dvi file seems to be good but I am curious why I get this message.

I tried changing the line (TeX-run-TeX "latexmk" "latexmk" master-file)
in many ways but without success.

Of course when I compile singlefile document then all works good without
any messages.

What should I change to get rid of this warning?

When I turn on toggle-debug-on-error I get this message

    Debugger entered--Lisp error: (wrong-type-argument stringp nil)
      TeX-synchronous-sentinel("latexmk" "../master" 12)
      TeX-run-TeX("latexmk" "latexmk" "../master")
      (let ((TeX-save-query nil) (TeX-process-asynchronous nil)
        (master-file ...)) (TeX-save-document "") (TeX-run-TeX "latexmk"
         "latexmk" master-file) (if (plist-get
         TeX-error-report-switches ...) (TeX-next-error t)
         (minibuffer-message "latexmk done")))
      call-interactively(run-latexmkk nil nil)

To clarify, if my document compile without errors (TeX errors) then I get
nice output file (and this annoying message). But when my document has
some TeX errors then I get  only `Wrong type argument` message. It is
then pretty unusable.

I would be grateful for any help.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]