作者:lakensei | 来源:互联网 | 2023-05-18 21:06
I'd like to be able to run a shell command on the current file that I'm editing and have the output be shown in the Shell Command Output window. I've been able to define the function which is shown below.
我希望能够在我正在编辑的当前文件上运行shell命令,并在Shell命令输出窗口中显示输出。我已经能够定义如下所示的功能。
(defun cpp-check ()
"Run cpp-check on current file the buffer is visiting."
(shell-command
(concat "/home/sburke/downloads/cppcheck-1.31/cppcheck "
(buffer-file-name))))
The only problem is that the output window isn't brought to the foreground in any way. What I'd like to happen is for the window to be split and the output window shown there. Also, am I on the right track here defining the function to be put in my .emacs file or is there a better way?
唯一的问题是输出窗口没有以任何方式带到前台。我想要发生的是窗口被拆分并在那里显示输出窗口。此外,我是否在正确的轨道上定义了要放在我的.emacs文件中的功能还是有更好的方法?
Any help would be appreciated. Thanks.
任何帮助,将不胜感激。谢谢。
4 个解决方案