auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] TeX-run-Tex wrong type argument


From: Ivan Andrus
Subject: Re: [AUCTeX] TeX-run-Tex wrong type argument
Date: Thu, 17 May 2012 12:13:18 +0200

It's because the master file is up a directory, and it is run synchronously.  
You can reproduce this by setting TeX-process-asynchronous to nil, and running 
TeX-command-master (C-c C-c) on a file with TeX-master set to something like 
"../master".

You can work around it by using the full path to the master file.  However it 
seems like a bug and should be reported—though maybe it's been fixed in CVS.  

Perhaps the best way to fix this would be to change TeX-master-file to call 
expand-file-name on the result.  This could be done with advice, but I haven't 
tried it.  There may be other repercussions or places that use TeX-master 
directly.

-Ivan

On May 14, 2012, at 1:26 PM, Adam wrote:

> Hello.
> 
> I use such a function for compiling LaTeX in emacs (AUCTeX) taken from
> http://stackoverflow.com/a/7811232/726922 (accepted answer by Jouni K. 
> Seppänen):
> 
>    (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" "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
> document.
> 
> 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")))
>      run-latexmk()
>      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.
> 
> 
> _______________________________________________
> auctex mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/auctex




reply via email to

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