+++ This bug was initially created as a clone of Bug #675691 +++
Description of problem:
Version-Release number of selected component (if applicable):
Steps to Reproduce:
# rpm -ql PyXML | grep -F .tex | xargs file
/usr/share/doc/PyXML-0.8.4/xml-howto.tex: Python script text executable
/usr/share/doc/PyXML-0.8.4/xml-ref.tex: Python script text executable
# rpm -ql emacs-common | grep -F .tex | xargs file
/usr/share/emacs/23.1/etc/refcards/calccard.tex: ASCII English text
/usr/share/emacs/23.1/etc/refcards/cs-dired-ref.tex: ISO-8859 English text
/usr/share/emacs/23.1/etc/refcards/cs-refcard.tex: TeX document text
/usr/share/emacs/23.1/etc/refcards/cs-survival.tex: LaTeX document text
/usr/share/emacs/23.1/etc/refcards/de-refcard.tex: TeX document text
/usr/share/emacs/23.1/etc/refcards/dired-ref.tex: ASCII English text
/usr/share/emacs/23.1/etc/refcards/fr-dired-ref.tex: ISO-8859 English text
/usr/share/emacs/23.1/etc/refcards/fr-refcard.tex: TeX document text
/usr/share/emacs/23.1/etc/refcards/fr-survival.tex: LaTeX document text
/usr/share/emacs/23.1/etc/refcards/gnus-refcard.tex: LaTeX 2e document text
/usr/share/emacs/23.1/etc/refcards/orgcard.tex: ASCII English text
/usr/share/emacs/23.1/etc/refcards/pl-refcard.tex: ASCII English text
/usr/share/emacs/23.1/etc/refcards/pt-br-refcard.tex: ASCII English text
/usr/share/emacs/23.1/etc/refcards/refcard.tex: ASCII English text
/usr/share/emacs/23.1/etc/refcards/ru-refcard.tex: LaTeX 2e document text
/usr/share/emacs/23.1/etc/refcards/sk-dired-ref.tex: ISO-8859 English text
/usr/share/emacs/23.1/etc/refcards/sk-refcard.tex: TeX document text
/usr/share/emacs/23.1/etc/refcards/sk-survival.tex: LaTeX document text
/usr/share/emacs/23.1/etc/refcards/survival.tex: LaTeX document text
/usr/share/emacs/23.1/etc/refcards/vipcard.tex: TeX document text
/usr/share/emacs/23.1/etc/refcards/viperCard.tex: TeX document text
--- Additional comment from firstname.lastname@example.org on 2011-02-07 09:05:15 EST ---
There are 2 problems:
1. File patterns for LaTeX check only first 400 bytes of file to determine its type and some of those files have long comment in the beginning, I will increase that limit.
2. Patterns which match Python script are tried before Latex which is bad in case there's python code in latex.
I'll send patch to upstream mailing list and then attach it here.
--- Additional comment from email@example.com on 2011-02-08 04:19:45 EST ---
Created attachment 477581 [details]
Check 4096 bytes from TeX file instead of 400 bytes. Increate strength of TeX patterns to beat Python, because it's more usual to have Python in LaTeX than LaTeX in Python.
file-5.04-7.fc13 has been submitted as an update for Fedora 13.
file-5.04-16.fc14 has been submitted as an update for Fedora 14.
file-5.04-7.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update file'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/file-5.04-7.fc13
file-5.04-16.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
file-5.04-7.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.