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: Essential question [re: Re: "Text is read-only"... except it isn't... or shouldn't be] Date: Sat, 18 May 2013 07:59:32 -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> <51937603.1050304@mousecar.com> <5194BE49.4070105@mousecar.com> <5194EC96.6040409@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 1368885572 9796 80.91.229.3 (18 May 2013 13:59:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 May 2013 13:59:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 18 15:59:32 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 1UdhfX-0008Ak-Vq for geh-help-gnu-emacs@m.gmane.org; Sat, 18 May 2013 15:59:32 +0200 Original-Received: from localhost ([::1]:40542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdhfX-0000C7-MG for geh-help-gnu-emacs@m.gmane.org; Sat, 18 May 2013 09:59:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdhfG-0000Ak-O8 for help-gnu-emacs@gnu.org; Sat, 18 May 2013 09:59:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UdhfA-00025J-Go for help-gnu-emacs@gnu.org; Sat, 18 May 2013 09:59:14 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:35227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdhfA-00025A-9y for help-gnu-emacs@gnu.org; Sat, 18 May 2013 09:59:08 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Udhf6-0007ov-2V for help-gnu-emacs@gnu.org; Sat, 18 May 2013 15:59:04 +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 ; Sat, 18 May 2013 15:59:04 +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 ; Sat, 18 May 2013 15:59:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 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: <5194EC96.6040409@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:90894 Archived-At: On 5/16/13 8:26 AM, ken wrote: > On 05/16/2013 09:30 AM Kevin Rodgers wrote: >> On 5/16/13 5:08 AM, ken wrote: >>> So given this: >>> >>> echo This is not an image file. > list.gif; emacs list.gif & >>> >>> which mode should emacs invoke? >> >> If you agree with the convention that .gif files are GIF images, then >> image-mode. >> >> If you choose to violate that convention, then I suggest: >> >> echo -e "-*- mode: Text;-*-\nThis is not an image file." > list.gif; >> emacs list.gif > > $ echo This is not an image file. > list.gif; file list.gif > list.gif: ASCII text The first step in getting emacs to emulate the file command is (setq auto-mode-alist nil) Then map /etc/magic into magic-mode-alist and interpreter-mode-alist. -- Kevin Rodgers Denver, Colorado, USA