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

Re: Gnome getting confused with mime types



Le lundi 17 novembre 2008 à 23:52 +0100, Olivier Ramare a écrit :
> ----------------------------------------------
> This is a chapter of a book, chapter which I want to
> open with emacs. However gnome always tells me
> [translation approximate]:
> -------------------------------------------------
> Impossible to open HRIW2.tex
> The name of this file "HRIW2.tex" indicates that it is
> a "document TeX" file. The content of this file indicates
> that it is a "script/MATLAB" file. [...]

Sounds like a bug in shared-mime-info. The magic strings are not precise
enough:

    <magic priority="10">
      <match value="%" type="string" offset="0"/>
    </magic>
    <magic priority="50">
      <match value="documentclass" type="string" offset="1"/>
    </magic>

The first is ignored as it has less priority than matlab, the second is
insufficient. We should probably set something like:

    <magic priority="50">
      <match value="\documentclass" type="string" offset="0:100"/>
    </magic>
    <magic priority="50">
      <match value="\chapter" type="string" offset="0:100"/>
    </magic>
    <magic priority="50">
      <match value="\section" type="string" offset="0:100"/>
    </magic>

Does it work for you?

-- 
 .''`.
: :' :      We are debian.org. Lower your prices, surrender your code.
`. `'       We will add your hardware and software distinctiveness to
  `-        our own. Resistance is futile.

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


Reply to: