mode: can't find master file
I'm having some problems with flymake-mode when editing latex files in emacs 23.4.1. First, when I start the mode I see Flymake:! in the mode line. The manual tells me this is because "Flymake was unable to find the master file for the current buffer.", but it doesn't suggest a solution. apropos tells me there is a function TeX-master-file-ask so I call it to set the master file and try flymake-mode again, but now it gives an error about .#file.tex not being found, but the file does exist.
How can I get flymake mode to work when editing latex files?
Try adding this to your .emacs
:
(setq flymake-allowed-file-name-masks
(delete '("[0-9]+.tex'"
flymake-master-tex-init
flymake-master-cleanup)
flymake-allowed-file-name-masks)) ; don't use multipart tex files
By default (Flymake .3), Flymake tries to be smart about multipart .tex
files it assumes that if your .tex
file ends in a number then you must be working on a multi-part file.
I personally find this behavior annoying since I like to work on files named assingment1.tex
and similar. However, by default, Flymake then assumes that there is an assignment.tex
master file, and I get stuck with the Flymake:!
behavior you describe.
Adding the above block to your .emacs
will disable this behavior.
上一篇: 自动加载未能定义功能胶乳
下一篇: 模式:找不到主文件