tom-tan / auctex-latexmk

This library adds LatexMk support to AUCTeX.
93 stars 24 forks source link

Could not find file [%(file-line-error)] #27

Closed kimhey closed 7 years ago

kimhey commented 8 years ago

Hi, I've setup according to your instructions except I'm using MiKTEX instead of Tex-Live. I get the following error: "main.tex"'' Latexmk: This is Latexmk, John Collins, 24 February 2016, version: 4.44.


Latexmk: Could not find file [%(file-line-error)]. -- Use the -f option to force complete processing.

LatexMk exited abnormally with code 11 at Wed Nov 16 13:06:20


Any idea what could be wrong here?

kimhey commented 8 years ago

Some more info about my setup:

This is how I setup Auctex in .emacs:

;;====== LaTeX/AUCTeX setup =================== (setq TeX-auto-save t) (setq TeX-save-query nil) ;;autosave before compiling (setq TeX-PDF-mode t) ;Set pdf-latex as default compilation mode (change between modes by: C-c C-t C-p) (setq TeX-parse-self t) ; AUCTeX depends heavily on being able to extract information from the buffers by parsing them. Since parsing the buffer can be somewhat slow, the parsing is initially disabled. This enables command automatic parsing of buffers (setq-default TeX-master nil) ; Query for master file.

;If you want to open all *.tex files with AUCTeX LaTeX mode add this to your .emacs: (add-to-list 'auto-mode-alist '(".tex$" . LaTeX-mode)) ;Actually, this shouldn't be necessary, because AUCTeX defines the tex-mode.el mode names as alias of its own modes.

;(add-hook 'LaTeX-mode-hook 'flyspell-mode) (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) ;add math mode

(set-default 'preview-scale-function 1.4) ; change the pre-viewing font size (otherwise too small)

(add-hook 'LaTeX-mode-hook (lambda () ;activate folding mode (TeX-fold-mode 1)))


After this I call your package as follows:

(require 'auctex-latexmk) (auctex-latexmk-setup) (setq auctex-latexmk-inherit-TeX-PDF-mode t)


In my .latexmkrc I only have the follwing:

$pdf_mode = 1;


General

I'm running this on Win7, emacs ver: 24.3.1, Latexmk ver: 4.44

tom-tan commented 8 years ago

Sorry for late reply.

Would you tell me the version of AUCTeX?

Latexmk: Could not find file [%(file-line-error)].

It indicates that TeX-expand-list-builtin (defined in tex.el in AUCTeX) does not contain %(file-line-error). I confirmed auctex-latexmk works with AUCTeX 11.89.7.

Congee commented 7 years ago

That's a bug that MikTex doesn't fix. An easy workaround would be (setq TeX-file-line-error nil) to disable --file-line-error feature so that you can go on your work.

FYI, https://tex.stackexchange.com/questions/328193/auctexs-line-number-information-does-not-work

tom-tan commented 7 years ago

Thank you for the information.

I will add a note for this issue for MikTex users.

tom-tan commented 7 years ago

Done!