[Top][All Lists]

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

Re: Language identification

From: Richard Stallman
Subject: Re: Language identification
Date: Fri, 28 Aug 2009 20:46:36 -0400

     > OTOH, how often do you see a file containg programming language code and
     > yet without ny extension?

    Extremely frequently.

Why do these files not identify the language explicitly?  It is easy
to do.

      The great majority that I see are correctly
    identified by file(1) (I believe using libmagic), however, by parsing
    the shebang.

That statement suggests that there are exceptions.  I would expect
there are, because guessing the programming language is an unreliable

Emacs uses a reliable solution: users should identify the language
either with the file name, or inside the file with a -*- line or a
local variables list.  It takes very little work to make a file say
what its language is, and the result is to identify the language
reliably from then on.

I don't think we should switch from our reliable to solution to

Is there a reason why users don't use the existing reliable mechanism?
Is there a real difficulty with using it?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]