I want to change the major mode from
compilation-mode for a buffer which contains some generated output named for eg.
*results*. I've tried to add an entry to
auto-mode-alist but if i understand correctly this works only with buffers which have a corresponding filename.
I've tried to add it in the list like this but this is not working.
(add-to-list 'auto-mode-alist '("\\*result\\*" . compilation-mode))
After some digging in I found that this particular lisp snippet is filling the buffer with data.
(start-process "result" "*result*" "some_unix_command")
This buffer is generated from a 3rd party plugin so i'd rather not start and change the src lisp code. I'd like to handle this on a different level.
I've already checked if I can attach a hook somewhere where the buffer is created and the answer is negative.
Anyone with some ideas on how I can do this?