Questions tagged [auto-mode-alist]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
50 views

How to enable a major + a minor mode on loading a file?

Clojure files should open in Clojure-mode. I also have Clojure files that contain color info and are used to generate my styles; they live under a /styles path. For these files, I want them to have ...
1
vote
1answer
42 views

Using two programming languages with the same file extension

I am just starting to set up a perl environment in emacs but the problem is that I already program with prolog and both languages use the .pl file extension. I have two directory ~/src/prolog and ~/...
1
vote
2answers
39 views

How can I make sure that Emacs opens files with extension `*.rec` as normal text files?

How can I make sure that Emacs opens files with extension *.rec as normal text files? When I try to open a file with the extnsion *.rec, I get the error message Running someFile.rec...done without the ...
0
votes
1answer
36 views

Do m-x command on entering buffer with a specific file type

Sorry if this is a really noob question. I have recently gotten into Emacs with the Spacemacs distribution and I installed a plugin called "focus." I want to be able to have the command &...
1
vote
1answer
47 views

How to stop Emacs from using LaTeX mode key bindings for `*.tex` files?

It seems that Emacs tries to autodetect the type of file and changes some of its behaviors accordingly. I don't want any of this behavior. I just want Emacs to treat every file as if it were some ...
2
votes
1answer
116 views

How do I associate a file such as git's `COMMIT_EDITMSG` with a specific mode?

I was doing following solution for markdown files: How do I associate a file extension with a specific mode? (autoload 'markdown-mode "markdown-mode.el" "Major mode for editing Markdown files" t) ...
0
votes
1answer
602 views

How to make Emacs edit JSON data in `json-mode`?

I am working with GNU Emacs 23.1.1. When working with a .json file it is treated in the Fundamental mode: How can I have the json file treated in the json mode? I note that GNU Emacs 24.3.1 opens ...
0
votes
1answer
592 views

does one has to explicity enable python-mode etc. to work with python files?

Sometimes I see people talking about enabling python-mode and so on. Is that only necessary for older emacs versions? I thought, the respective mode is enabled automatically when opening a ...
1
vote
1answer
62 views

Enable diff-mode for files with diff-ish content

How do I make Emacs automatically turn on diff-mode for any file with diff-looking content, eg. --- a.txt +++ b.txt @@ -1234,56 +1234,56 @@
3
votes
1answer
238 views

“Dissasociate” auto-mode for specific files (in ESS)

I'd like to keep ess as automatic major mode for R files and everything else, except for Julia, for which I want to use julia-mode alone. However, I cannot find out how to "unbind" the file ...
1
vote
1answer
85 views

Is There a Way To Set “Lisp-Interaction-Mode” to be Default?

I'm using Emacs in the terminal of Mac. Each time I exist an .el file and reopen another, I have to set lisp-interaction-mode. Is there some sort of command or item I can place in the .emacs file to ...