When creating a new buffer via:
C-x b
NonExistentBufferName
RET
RET
I would like Emacs to prompt me for the major mode this buffer is going to use upon opening. Moreover, I want Emacs to infer the major mode in some cases based on the buffer's name:
C-x b
test.org
(no such buffer/file so far)RET
RET
=> org-mode is used without asking me anything.
Could anybody advice on how I can achieve this? Package or, probably, just pure elisp with its hooks and advice?
P.S.
I'm using ido
if it matters.