compile commandA string composed of command followed by the string returned by the function sg:compilation-filter is passed to the shell to be executed. The output is sent to the buffer named *compilation*. The command string is initialized from the function sg:compile-command. If the string %F is encountered in the command string, the file name of the current buffer is substituted.
The output of the compilation may be used by command next-error or this-error to process compilation errors. In order for next-error and this-error to understand which file to load and which line to move to, the output should be a list of lines where each line reads:
file-name:line-number:rest of message
The output of the function sg:compilation-filter is typically a pipe into a command that will filter the output from the compiler into this canonical form.
The shell under which compile is executed is controlled by the resource named shellExec. This should be the full pathname of the shell along with any necessary flags. The default is /bin/csh -f [X] or cmd.exe [MS]. The shell is invoked with a command that sets its working directory to the current working directory of the buffer from which the compile command was invoked.