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

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

Re: "Text is read-only"... except it isn't... or shouldn't be


From: ken
Subject: Re: "Text is read-only"... except it isn't... or shouldn't be
Date: Tue, 14 May 2013 08:22:00 -0400
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130402 Thunderbird/17.0.5

On 05/14/2013 04:59 AM Peter Dyballa wrote:

Am 14.05.2013 um 08:46 schrieb Eli Zaretskii:

Solution: remove that extension from auto-mode-alist, and Bob's
your uncle.

Cool.  That's what I want.  So I guess I put something in
~/.emacs... but what?

I don't know what is the file-name extension of that file, so I
cannot give a precise recipe.  Assuming for a moment that its
extension is .png, I see that auto-mode-alist includes this
element:

("\\.png\\'" . image-mode)

So to remove this, you need to do this:

(delete '("\\.png\\'" . image-mode) auto-mode-alist)

Since this removes all image support from PNG (or the actual type of)
files it might be more useful to either rename the file temporarily
or to create a link with an extension like .txt and edit that link.

Yeah, I thought about all that. As I said in my original post though, I've been happily editing this file with this name for years. I would sooner switch to using vi on it than to change the file's name in any way. Second and more importantly, I don't care for the Windozy attitude toward users, treating then like idiots and upon that rationale, taking control away from users, or their 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.




reply via email to

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