From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: "Text is read-only"... except it isn't... or shouldn't be Date: Tue, 14 May 2013 23:17:44 -0600 Message-ID: References: <5190B6C2.3060801@mousecar.com> <83y5bi97sp.fsf@gnu.org> <51911A2B.6070100@mousecar.com> <83r4ha959c.fsf@gnu.org> <5191A2BA.7080108@mousecar.com> <83bo8e83ef.fsf@gnu.org> <6DBF2725-3120-4A0D-A23B-C1C16CA8AF22@Web.DE> <51922C68.1030700@mousecar.com> <8338tp8yuu.fsf@gnu.org> <5192A11F.1080003@mousecar.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1368595061 2829 80.91.229.3 (15 May 2013 05:17:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 May 2013 05:17:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 15 07:17:38 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UcU5q-0005wN-K0 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 May 2013 07:17:38 +0200 Original-Received: from localhost ([::1]:37223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcU5q-0007JV-27 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 May 2013 01:17:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcU5d-0007JN-1J for help-gnu-emacs@gnu.org; Wed, 15 May 2013 01:17:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcU5Z-00084d-Sw for help-gnu-emacs@gnu.org; Wed, 15 May 2013 01:17:24 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:49955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcU5Z-00084X-Lq for help-gnu-emacs@gnu.org; Wed, 15 May 2013 01:17:21 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UcU5X-0005lA-D8 for help-gnu-emacs@gnu.org; Wed, 15 May 2013 07:17:19 +0200 Original-Received: from 71-215-72-36.hlrn.qwest.net ([71.215.72.36]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 May 2013 07:17:19 +0200 Original-Received: from kevin.d.rodgers by 71-215-72-36.hlrn.qwest.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 May 2013 07:17:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 71-215-72-36.hlrn.qwest.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 In-Reply-To: <5192A11F.1080003@mousecar.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90791 Archived-At: On 5/14/13 2:39 PM, ken wrote: > On 05/14/2013 09:39 AM Eli Zaretskii wrote: >>> Date: Tue, 14 May 2013 08:22:00 -0400 >>> From: ken >>> CC: Eli Zaretskii , help-gnu-emacs@gnu.org >>> >>> [...] overly simplistic strategy for determining a file type merely >>> by looking at the filename extension, especially when this can be >>> more suitably and accurately and intelligently accomplished by >>> determining a file's magic number as the Linux "file" utility does. >> >> Emacs does look at the magic signature, see magic-mode-alist. >> > > They why didn't it see that my file was (obviously) a text file and not an image > file? 1. Because the default value of magic-mode-alist is nil. 2. Because the default value of auto-mode-alist matches the ".gif" extension. 3. Because it is not obvious what the signature is for a text file -- perhaps something like "\\`[[:print:]\t\f\r\n]", which is so general that it would prevent most of the existing automatic method from working. See the "Choosing Modes" section of the Emacs manual. -- Kevin Rodgers Denver, Colorado, USA