2

How to see *Messages* buffer as advised in this answer - https://emacs.stackexchange.com/a/32069/23367?


Why do I need this?

I am new to Spacemacs and I am trying to understand how it can help me writing Ansible roles and testing them. I found Ansible layer, added ansible to dotspacemacs-configuration-layers and restarted Spacemacs. Still I have no idea how to use that. SPC m h a doesn't work - resulting in SPC m is undefined. Spacemacs shows /YAML\ at the bottom near the filename. I don't see that Spacemacs detected YAML file as an Ansible playbook - I don't get any hints or errors displayed on the screen. Perhaps I need to change mode from YAML to Ansible somehow, but first I need to check if there are any errors why loading the layer for Ansible.

  • 2
    What have you tried? – DoMiNeLa10 May 2 at 11:43
  • @DoMiNeLa10 I tried evil-tutor, but didn't get far. – Anatoli Babenia May 2 at 13:09
2

This is possible in Spacemacs with SPC w p m key sequence (mentioned here).

For more general way, in Spacemacs you can open buffer list with SPC b b. Then you can use your arrow key to find the desired buffer.

default buffer list

If you don't find the desired one, probably it's hidden. Spacemacs use Helm and Helm hide 'unuseful' buffer by default. You can use C-c a to show hidden buffers

2

It's just a buffer, so any of the numerous methods of switching to a buffer can be used.

For example, using standard Emacs key sequences:

  • C-xb *Messages* RET
  • C-xC-b and select *Messages*
  • M-x ibuffer RET and select *Messages*
  • <C-down-mouse-1> and select *Messages*
  • Click on the Buffers menu, and select *Messages*
  • C-x<right> until you reach *Messages*

As it happens, there are also two key bindings specifically for this purpose:

  • C-he runs the command view-echo-area-messages
  • Click mouse-1 in the echo area (same space as the minibuffer).

So you would probably use one of those by preference; but I wanted to make it clear that there's nothing special about this buffer when it comes to viewing it -- you can reach it in the same ways you use to get to any other buffer.

  • 2
    I am always a bit wary when they add a tag like [spacemacs] or [ergomacs]. Sometimes they rebind stuff in those configs. (That is the reason why I did not write an answer for this one.) Have you tested whether it works in spacemacs? – Tobias May 2 at 11:56
  • 2
    No; I always leave it up to the user to translate from the standard keys to their own custom key bindings. They can always run emacs -Q and check which command a standard key sequence is bound to, and then look up the equivalent in their own config. I've edited the answer to clarify that I'm showing default Emacs bindings. – phils May 2 at 12:11
  • No doubt someone who uses spacemacs will provide a more targeted answer, if the suggestions I've made don't work. – phils May 2 at 12:14
  • This is a good answer, but I wonder if we shouldn't either (1) change the question to be about any buffer, not *Messages* or (2) delete it as a duplicate, and change the other question to be specifically about *Messages* (not Spacemacs log). I added a mention of how to get to *Messages* to the answer of the other question this one duplicates. – Drew May 2 at 13:59
  • I added mouse-1 click in echo area. – Drew May 2 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.