help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Essential question [re: Re: "Text is read-only"... except it isn't..


From: Kevin Rodgers
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
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

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




reply via email to

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