![]() ![]() February 16, 2003 Douglas Clark is a program management consultant who first started using OS/2 version 1.3. He's married, with 2 girls, and is old enough to remember when 4 color mainframe terminals were a big thing. If you have a comment about the content of this article, please feel free to vent in the OS/2 eZine discussion forums. There is also a Printer Friendly version of this page. |
![]() |
![]()
Netlabs EPM Distribution - NED
The Netlabs EPM Distribution is a project to standardize and simplify the
installation and configuration of EPM, which is also known as the Enhanced
Editor. Before we can talk about the Netlabs EPM Distribution, we need to know
something about EPM itself.
| |||
EPM is an editor developed by IBM, based on an editor core or engine that was developed for other platforms. The editor is known as the E editor on other platforms; when it was ported to OS/2 a PM interface was added - hence the name EPM. The E editor is available in PC-DOS, and the editor engine used in EPM is also used in the command line editor TEDIT. EPM consists of a core edit engine, and a macro language called E (I guess once they found a letter that worked they decided to stick with it. I personally think the macro language should have been called L, or maybe even M.) The editor can be extensively configured with E language statements and programs, and much of the function of EPM is provided through E. The user interface to EPM is a somewhat strange combination of graphical and command line; the graphical part of the interface being the menus, mouse actions, etc. and the command line part through a dialog box where where editor commands are typed. Some of the editor commands come from the editor core, but the majority of the commands are built from E language routines. The E language is specific to the editor, and is based on Rexx but with some differences. In E variables contain an undefined value until they are initialized, in Rexx all uninitiated variables are set to the name of the variable. In E all variables are local in scope, but can be declared to be global, where in Rexx variables are global in scope, but can be made local with the PROCEDURE statement. E macros must be compiled before they can be used; Rexx programs are not compiled. Other than those differences the two languages are very, very similar. The E language is used to configure the editor, and to write commands that can either be issued from the command dialog, or associated with menu items; events such as dropping of a file, or mouse actions. The commands are really E routines the perform some action in the editor. Because the E language is fairly easy to use, and because the E editor has been around a long time, there are a whole slew of macros/commands available for use in EPM, many of them available on Hobbes. What the Netlabs EPM distribution does is bundle up most of the add-on EPM macros and commands, and provides a WarpIN install program for installing EPM with the bundled add-ons in a structured, uniform manner. The Netlabs EPM Distribution (hereafter called NED) also simplifies configuring EPM and maintaining that customized configuration while using the various add-on packages, which is not always so easy to do. NED also provides a slick interface to the EPM compiler (ETPM) along with some customizations to EPM. Installing NEDCurrently NED can only be installed by WarpIN version 1.19; it wants this exact version of WarpIN. This is a bug that the developers recognize and will change in a future release. So the first step is to install version 1.19 of WarpIN on your machine. If this is the very first version of WarpIN to be installed on your machine you will have to install WarpIN twice before it registers its own version number in its own database, so that it will be recognized as the correct version by NED. If you already have WarpIN installed, any version, you only have to install WarpIN version 1.19 once.If you don't already have the Enhanced Editor (EPM) installed on your machine, you need to install it. NED does not include EPM itself, just the add-on packages and the documentation. You can install the Enhanced Editor with the OS/2 install program; run the Selective Install and select the Tools and Games check box, then click on MORE, then select the Enhanced Editor. Alternatively you can download EPM from Hobbes. After installing WarpIN, download NED and double-click on the downloaded file to start the installation. The installation program allows you to pick some of the add-on packages to be installed, such as the VoiceType interface. Once you get done you will have a folder that looks like this. The folder will be located in the PROGRAMS - APPLICATIONS folder.
You can execute the NED version of EPM by clicking on the Netlabs EPM icon, or you can execute your "regular" Enhanced Editor by using your existing EPM icon. NED creates a set of directories designed to keep configuration files created by you separate from standard EPM files and files provided by Netlabs. The directory structure looks like this:
I used the directory EPM as my top level directory, which is different from the default. The three subdirectories are:
What is NED?NED is a bundle of stuff, including
Changing the Configuration of EPMCurrently the way EPM is designed is that in order to change most of the configuration items, you must create a file, add entries to the file, and recompile EPM. This is one of the areas the NED project is trying to change; they are trying to make configuration of EPM changeable without recompiling the editor. The have made some strides in that area, but doing so is a complex, time consuming affair. For a comparison of the current EPM method for changing configuration and a menu or dialog box method, see the LPEX editor article in this month's issue of OS/2 eZine.Currently, to change most of the configuration items you have to create one of two files: mycnf.e or mykeys.e, place those files in the MYEPM\MACROS directory, and recompile EPM. With NED, this is much easier than it sounds. The file mykeys.e is where you change the behavior assigned to keys in EPM. All other configuration changes go into the mycnf.e. When I installed NED and brought across my configuration settings I have been using since EPM v 5.51, I discovered that most of what I had set was already in the standard NED configuration. My configuration file, with most of the stuff commented out because it isn't needed any more, is shown below. The -- characters are the beginning of a comment. The file mykeys.e that I have sets the key mappings to what I prefer. F2 brings up the Save dialog, F5 brings up the search dialog, F6 brings up the undo dialog, and F9 duplicates a line leaving the cursor in its original position. I also changed the Page-Up and Page-Down keys so that they scroll the page so that the line the cursor is on is moved to the top (or the bottom) of the screen. Subsequent uses of Page-Up and Page-Down scroll a full screen's worth of lines. As we said above, one of the goals of the NED project is to make configuration changes possible without recompiling the editor. However with NED, recompiling is really quite painless. The steps are:
Writing MacrosMacros in EPM can be written in Rexx, or in E. E macros are compiled into a file with an extension of *.EX, and must be "linked" into EPM before they can be used. When they are linked into EPM they become a command that can be typed from the command dialog.Compiling E macros is only slightly more complicated than recompiling EPM. To compile an E macro:
When the macro is finished compiling you will have a file with an *.EX extension. To use the file you can either:
ConclusionEPM is a very powerful editor, and there are numerous add-on packages to enhance EPM for specific tasks. For example with the spell checker added and the kHTML package added it becomes a very nice HTML editor - which is what I am using to write this article.The Netlabs EPM Distribution is a very welcome "standardization" of the EPM
package, and a very nice enhancement to EPM. I highly recommend it for anyone
that uses EPM. And I congratulate the NED team for a fine product.
|
|||||
|