| EPM startpage | Homepage | Contact me | SiteMap |
| EPM 6.03b Basics | - by Jörg Tiemann |
On this Page:
EPM is part of the standard Warp 4 installation. But we need some more ingredients to make EPM do all the marvelous things we want it to do. First of all we need ETPM, the compiler for the e macros we're going to use. Next some more documentation wouldn't be too bad. Finally it is a good idea to get all the samples for EPM, especially the e macros, because source is the ultimate documentation - and can be fun, too. The samples showing how to combine the powers of E and Rexx (.erx) are also quite interesting. In short: Warp 4 EPM is good for fixpack updates, but you better get the real stuff! Source: CD If you own an IBM ServicePac CD it it a good idea to search it for epm603b.zip (I found it at x:\image\epm603b\epm603b.zip). This archive (3 MB) contains all those things I've been writing about in the last paragraph, and more. A short description of the included files is given in epmbbs.txt (ASCII, 11K). For those unfortunately enough not to own such a CD I've put this file in my Downloads area.
There isn't much to be installed, however as a complete EPM installation can consist of several hundred files, it might be a good idea to use a directory structure like the following:
EPM for he main stuff, bitmaps, exe, epmkwds.*, *.bar etc
|
+--E_MACROS the *.e macros in use
|
+--E_REXX for *.erx macros
|
+--E_SAMPLES *.e macros currently not used, reservoir of ideas
Assuming you follow this advice, these are the steps of installation:
Reading the comp.os.os2.* or the de.comp.os.os2.* newsgroups I've come across the same misunderstandings about EPM customization again and again. Thus I'll try to give a brief and easy to understand introduction on how to get started.
It is a good idea to start building up your own mycnf.e by adapting an existing sample file. For that reason here comes an abridged version of my own mycnf.e:
As this file is supposed to contain your own commands and procedures, I can of course give only an example of what might be written in it. The following is a short excerpt from what can be found in my mystuff.e. If you don't have any own stuff to put in it, you can just leave this file out.
Again, this file is optional. It might contain your key settings or keyset settings. Just for illustration here comes another example of how this file might look like:
There are two different methods to "smuggle" your own code into EPM. One way is to include it. That means that your E code is compiled together with the main code (epm.e, its buddies and your my*.e files). The resulting file is epm.ex and this contains all the executable code that makes your EPM so special. To achieve including you have to add the appropriate statements in your mystuff.e (and then recompile EPM). As seen above, this could look like this:
This commands are compilation directives. The difference between include and tryinclude is that if the former fails (say because the E is garbage) the compilation fails and is stopped, whereas the failure of the latter has only the effect that the file isn't included, but the compilation goes on (thus no revert command in this example). In contrast to including you can also link an external module with the executable code. This module is nothing but an *.EX file. So say you have that cool macro revert.ex. You can open the EPM command prompt, enter link revert the revert command will be available in the EPM session. If you don't need that command any longer, you can unload it with unlink revert. Both methods have their little pros and cons. I in most cases prefer to include own code. Then it's just one run of the compiler, relaunching EPM and the wanted features are permanentely available. On the other hand linking is faster and maybe more comfortable in some development situations (see the relink command in 6. Compiling macros). Keep in mind however that not all files can or should be compiled and linked (my*.e not, some of the menu files not, ...). This one is easy. Just hit <Ctrl-I> or <ESC> to open the EPM command prompt and then enter etpm epm or just etpm
You will get the message if the compilation completed successfully (down in the message-line). If an error occurs EPM will try to load the *.E file which caused the error and you can try to detect and remove that error. If there are no errors you have to quit all EPM instances and relaunch EPM for the changes to take effect. Good Luck!
While in the above example we recompiled the EPM, there is the option to compile single *.E files, too. Say, we have that wonderful macro shellkram.e (source) and want to make an *.EX (compiled macro) file out of it (to link it). Then, we can do the following. We again open the EPM command prompt and this time enter etpm shellkram. Let's assume the compilation goes through just fine, we link our macro, but then notice some minor glitches, fix them in the source and want to activate the changes ... It would be slightely embarrassing if we now had to unlink, compile and link that macro again (and again and again). Therefore there is a shortcut command with the surprisingly plausible name "relink". Thus we simply enter relink shellkram and the whole procedure is done in one step.
Finally here are links to some recommendable articles dealing with EPM by other authors: Customizing the Enhanced Editor - written by Jörg Schwieder A Look at EPM 6.0x - written by Paul Floyd Adding syntax highlighting to EPM - written by Paul Floyd More links to articles about the Enhanced Editor you can find on a separate page.
|
| EPM startpage | Top | Homepage | Contact me | SiteMap |
| Copyright © 1998-2002 - Jörg Tiemann | Last modified: Sat, 5 Jan 2002 |
|
|
|
|