[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
solution.
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
guessing.
Is there a reason why users don't use the existing reliable mechanism?
Is there a real difficulty with using it?
Language identification (was: using libmagic in Emacs), Juri Linkov, 2009/08/27
Re: Language identification,
Richard Stallman <=
Re: Language identification, Stephen J. Turnbull, 2009/08/29
Re: Language identification, Stefan Monnier, 2009/08/29
Re: Language identification, Stephen J. Turnbull, 2009/08/29
Re: Language identification, Richard Stallman, 2009/08/30
Re: Language identification, Juri Linkov, 2009/08/28
Re: Language identification, Stefan Monnier, 2009/08/28
Re: Language identification, Richard Stallman, 2009/08/30
Re: Language identification, Richard Stallman, 2009/08/29
Re: Language identification, Juri Linkov, 2009/08/29
Re: Language identification, Richard Stallman, 2009/08/30