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.
(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?
Any help would be appreciated. Thanks.