Emacs ActiveX (COM) interface

Emacs supports one ActiveX interface called:

Barry Scott Emacs.Commandline

This interface has one function defined which takes two string parameters:

CommandLine current_directory command_line

Emacs will change its current directory to the value of the current_directory parameter. Then the command line in command_line is parsed and executed by emacs.

The following code VBA fragment creates the emacs command line object and opens the file "u:\work\emacs\emacs.cpp". The current directory is set to "u:\work".

Set myServer = CreateObject("Barry Scott Emacs.CommandLine")
myServer.CommandLine "u:\work", "emacs\emacs.cpp"

This second example runs the a package:

Set myServer = CreateObject("Barry Scott Emacs.CommandLine")
myServer.CommandLine "u:\work", "/package=testpack arg1 arg2 etc"