Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs disable *Messages* buffer

Tags:

Is there a way to disable the Messages buffer? I know I can kill it, but it reappears. I know I can scroll through buffers without passing by Messages, but is there a way I can just disable the creation of it?

Thank you.

like image 240
David Gomes Avatar asked Apr 15 '12 18:04

David Gomes


2 Answers

Based on the answer above, place this in your .emacs to completely disable the messages

;; Forces the messages to 0, and kills the *Messages* buffer - thus disabling it on startup. (setq-default message-log-max nil) (kill-buffer "*Messages*") 

Also, if you're like me, this is how you remove the Completions buffer that appears when opening a new file from the buffer.

;; Disabled *Completions* (add-hook 'minibuffer-exit-hook        '(lambda ()          (let ((buffer "*Completions*"))            (and (get-buffer buffer)             (kill-buffer buffer))))) 
like image 181
Ole Avatar answered Oct 09 '22 11:10

Ole


You can customize the variable message-log-max and give a value of nil to disable logging:

Maximum number of lines to keep in the message log buffer. If nil, disable message logging.  If t, log messages but don't truncate the buffer when it becomes large. 

I tried killing the *Messages* buffer, producing messages (that show on the minibuffer), and no new messages buffer appears.

like image 44
Juancho Avatar answered Oct 09 '22 09:10

Juancho