From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Language identification Date: Fri, 28 Aug 2009 20:46:36 -0400 Message-ID: References: <87skfczqc8.fsf@mail.jurta.org> <87y6p45n4m.fsf@uwakimon.sk.tsukuba.ac.jp> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1251506888 18668 80.91.229.12 (29 Aug 2009 00:48:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Aug 2009 00:48:08 +0000 (UTC) Cc: juri@jurta.org, monnier@iro.umontreal.ca, joakim@verona.se, emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 29 02:48:00 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MhC6q-0006tX-28 for ged-emacs-devel@m.gmane.org; Sat, 29 Aug 2009 02:48:00 +0200 Original-Received: from localhost ([127.0.0.1]:46659 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhC6o-0000GM-U0 for ged-emacs-devel@m.gmane.org; Fri, 28 Aug 2009 20:47:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhC5b-00087j-28 for emacs-devel@gnu.org; Fri, 28 Aug 2009 20:46:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhC5W-00084m-51 for emacs-devel@gnu.org; Fri, 28 Aug 2009 20:46:42 -0400 Original-Received: from [199.232.76.173] (port=37421 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhC5W-00084e-1d for emacs-devel@gnu.org; Fri, 28 Aug 2009 20:46:38 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:47129) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MhC5V-00053Z-Nd for emacs-devel@gnu.org; Fri, 28 Aug 2009 20:46:37 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MhC5U-0007v5-4q; Fri, 28 Aug 2009 20:46:36 -0400 In-reply-to: <87y6p45n4m.fsf@uwakimon.sk.tsukuba.ac.jp> (stephen@xemacs.org) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114806 Archived-At: > 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?