All Questions

Tagged with
Filter by
Sorted by
Tagged with
2
votes
1answer
46 views

Set the major mode of a new buffer interactively

When creating a new buffer via: C-x b NonExistentBufferName RET RET I would like Emacs to ask me what major mode this buffer is going to use upon opening. Moreover, I want Emacs to infer the major ...
0
votes
1answer
93 views

Switching buffer to special mode or any mode?

I have written some code to create a new buffer, it starts up in fundamental mode, the buffer is to display output from commands. I am using this to create the buffer (get-buffer-create "*My Buffer*"...
0
votes
0answers
91 views

Is there a way for a display-buffer-base-action function to know the forthcoming major-mode?

I am writing a mode that implements a persistent horizontal window (very similar to the "persistence compile window" in ECB). While I did study the ECB code it is quite old and endeavored to work ...
4
votes
1answer
1k views

Change the default mode used when opening a new buffer

For example, we can open a new buffer with C-x b <new-buffer-name>, and by default, this new buffer opens in fundamental-mode, which is not very useful to me. I would like to change this to open ...
5
votes
2answers
715 views

How to set major mode according to buffer name for non-file buffers

Some buffers are created by emacs and is set in fundamental mode, like the Org-Babel results. I think it is more convenient to set them in special mode, which can be closed with key q. How do set the ...
4
votes
1answer
162 views

How to specify the buffer mode on the command line?

I want to open a file in makefile-gmake mode. Is there a way to do this from the command line? I'm looking for something like: $ emacs -m makefile-gmake filename I do not want to change any config ...
13
votes
6answers
784 views

how to get buffers (not just files) to honor auto-mode-alist?

Q: how can I get new buffers to honor the mapping in auto-mode-alist? When finding a file, Emacs compares the file extension to the auto-mode-alist to determine which major mode to use for the file's ...