I use Linux Mint with gvim_7.3.429 in order to edit my TeX files. Recently I got the following result when comparing two files:
goswin@mycomp diff oktext.tex bugtext.tex
1,7c1,7
< \documentclass[10pt]{scrartcl}
< \usepackage[utf8]{inputenc}
< \usepackage[T1]{fontenc}
<
< \begin{document}
< Hello world
< \end{document}
---
> \documentclass[10pt]{scrartcl}
> \usepackage[utf8]{inputenc}
> \usepackage[T1]{fontenc}
>
> \begin{document}
> Hello world
> \end{document}
The files are definitely different, since the first one compiles properly, while the second one crashes with the following output:
goswin@mycomp pdflatex bugtext
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
entering extended mode
(./bugtext.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, nohyphenation, ngerman, german, german-x-2009-06-19, ngerman-x-2009-06-19, spanish, galician, catalan, loaded.
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1
��%\documentclass[10pt]{scrartcl}
?
! Emergency stop.
How can I find out what is going on? (The file I need to debug is actually much larger; I deleted almost all of its content, but the error remains.) And, by the way, why is it loading all of those hyphenation files without my telling it to do so?