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: ken
Subject: Re: Essential question [re: Re: "Text is read-only"... except it isn't... or shouldn't be]
Date: Thu, 16 May 2013 10:26:30 -0400
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130402 Thunderbird/17.0.5



On 05/16/2013 09:30 AM Kevin Rodgers wrote:
On 5/16/13 5:08 AM, ken wrote:
On 05/16/2013 02:27 AM Kevin Rodgers wrote:
On 5/15/13 5:48 AM, ken wrote:
On 05/15/2013 01:17 AM Kevin Rodgers wrote:
On 5/14/13 2:39 PM, ken wrote:
On 05/14/2013 09:39 AM Eli Zaretskii wrote:
Emacs does look at the magic signature, see magic-mode-alist.

....

Yes: Instead of trying to detect text files by their content, detect all
the
other kinds of files by their content or name (and then default to
Fundamental
mode).


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



reply via email to

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