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

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

Re: How to disable file extension auto-detection or auto-action?


From: Andrea Crotti
Subject: Re: How to disable file extension auto-detection or auto-action?
Date: Tue, 22 Mar 2011 13:17:22 +0100
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux)

"Tadeus (Eus) Prastowo" <0x657573@googlemail.com> writes:

> Hi!
>
> When working on a bug in apt-cacher[1], I needed to read the content
> of *.bz2 files that actually were only text files. But, every time I
> open a .bz2 file, Emacs sees the extension and does auto-decompression
> resulting in an empty buffer.
>
> Is there a way to open a file dumbly without any sort of auto-action?
>
> Thank you.
>
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618996

Hi Tadeus (I think you know me :))

If the files .bz2 that you want to modify have something unique (like a
path prefix) you might also add an entry to auto-mode-alist with a
matching regexp.

For example
"bugs.*.bz2$" . fundamental-mode

In this way you get automatically the desired behaviour locally.
If they're all in the same directory you might even use some
dir-local-variable.

Hope it helps!
-- 
GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0)
 of 2011-03-04 on plaetekopp



reply via email to

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