简体   繁体   English

如何强制Emacs显示* Messages窗口

[英]How to force Emacs display of `*Messages*` window

I'm printing a message like this 我正在打印这样的消息

(interactive "P")
(message "test")

If the Messages buffer is not visible in the frame, it should appear as a split window. 如果“ 消息”缓冲区在框架中不可见,则应显示为拆分窗口。 I've seen some softwares do this (maybe tramp) not sure how to do this. 我已经看到有些软件可以做到这一点(也许是流浪汉),但不确定如何做到这一点。

I already read http://www.gnu.org/software/emacs/manual/html_node/elisp/Displaying-Messages.html 我已经阅读了http://www.gnu.org/software/emacs/manual/html_node/elisp/Displaying-Messages.html

I think this works 我认为这有效

(defun my-kbd-x-hook (&optional use-generic-p)
  "Curl call"
  (interactive "P")
  (message "hi")
  (switch-to-buffer-other-window "*Messages"))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM