In compilation, occur search, grep search, etc., Emacs will create a new buffer in a separate window to show the results, is there anyway to jump to that window automatically? It is useful because then I can use n and p instead of M-g n and M-g p to move to next and previous items; plus, the buffer can be quit quickly with q. Currently I manually switch to the new buffer every time I run those commands, which is just annoying. Thanks.
In compilation, occur search, grep search, etc., Emacs will create a new buffer in
Share
You can use advice.
For example to jump to the grep buffer use the following advice:
For occur you can use the following advice