Distributing new keymaps

Get help with installation and running Multi-Edit here. Bug reports can be posted here but please not post feature requests here.

Moderator: Moderators

Distributing new keymaps

Postby Eric Pement on Thu Oct 23, 2003 8:40 pm

I've written a keymap replacement for Multi-Edit 9 that causes Multi-Edit to emulate the keybindings of GNU Emacs. I've had quite a lot of success with it, to the point that I'm fairly (but not perfectly) satisfied with the results. The keymap also requires a separate Emacs.s function file that must be compiled for the keymap to work. In fact, I've also altered the menubar for ME so that its commands are pretty close to the menubar order in the Emacs distrib. (I use ME and Emacs both, daily.)

Now suppose that I'd like to distribute this keymap package to other Multi-Edit users. Specifically, how do I use the Update Macros to distribute the keymap? I have read the doc files on the Update Macros from ME 8.0, but they don't offer enough practical advice. I need to install the emacs.db file in the ~/config directory, the emacs.s file in the ~/src directory, compile the emacs.s file, and (I think) also change the user's meconfig.db to use the emacs.db file as well.

The documentation doesn't actually tell me "what to do" to distribute a replacement keymap. Is this something that could be addressed in the docs for Multi-Edit sometime in the near future, to make it easier for users like me to offer their assistance to others? Thanks.
Eric Pement
Registered User
 
Posts: 55
Joined: Wed Oct 15, 2003 10:53 pm
Location: Chicago

Postby ReidSweatman on Wed Nov 05, 2003 9:07 am

Examine the files in <ME_PATH>\Utils with extensions of .upd, particularly WCmdMap.upd, Brief.upd, and WordStar.upd, which update the keymaps for native Multi-Edit, and Brief and WordStar emulation, respectively. One of these update scripts runs when you install Multi-Edit, depending on the choice you make. Together with the reference material in the online help, these files should tell you what you need to know to put together your own upgrade files.

A good method for isolating the specific changes you want to put in your script is to temporarily replace your <ME_PATH>\Config\WCmdMap.db file (or whichever one you actually use) with a copy of the one in <ME_PATH>\Default (obviously, back your original files up, and make the substitutions with Multi-Edit shut down.) Then recreate your EMACS keymap, but nothing else, and run a difference comparison on the files in the two directories. Anything different will be due to your modifications. You can then insert those changes into a script based on one of ours. Test the script by running it on a copy of Multi-Edit with a plain-vanilla keymap. When you're satisfied it works, distribute the script and the source for your EMACS.s. If you always install from a known location, you can have the script copy the source file and compile it as well, using the CopyFile and Compile script commands.
Reid Sweatman
User avatar
ReidSweatman
Developer
 
Posts: 455
Joined: Tue Jul 01, 2003 8:35 pm
Location: 2000 Light-years from Home

Postby ReidSweatman on Sat Nov 08, 2003 10:11 am

I'm going to have to eat some crow here, as some of what I told you in my last post isn't right. In particular, the files WCmdMap.db, Brief.db, and WordStar.db are the actual key maps, and are copied from <ME_PATH>\Default to <ME_PATH>\Config during installation, depending on which one you selected.

You can still examing the update scripts I mentioned, and use the diff method to extract just your changes, which you can then incorporate into your own update script. In light of the misinformation I gave you, just be careful to note what the sample scripts act on, and the locations they copy things to and from; these are likely to be different from what you want. However, the method is sound.
Reid Sweatman
User avatar
ReidSweatman
Developer
 
Posts: 455
Joined: Tue Jul 01, 2003 8:35 pm
Location: 2000 Light-years from Home


Return to Support

Who is online

Users browsing this forum: No registered users and 0 guests