The table or reference card of Emacs and PSGML commands can be confusing for beginners. This section provides some examples of how to use them.
Note | |
---|---|
This section assumes that you have already loaded the DTD file
( |
Instead of typing a tag each time you need to use it, use the key combination Ctrl-c, followed by <. At the bottom of the Emacs window, you will see:
Tag: <
To view a list of available tags, use either the Tab or ?. Or, if you know the first few letters of a tag, you can enter them followed by Tab for a complete list of available tags beginning with those letters or for a tag completion.
Try the following: Type Ctrl-c followed by <. Then enter the letter k, followed by Tab. You may have to use the Tab key several times to get a complete list.
The output should look similar to the example below:
Click mouse-2 on a completion to select it.
In this buffer, type RET to select the completion near point.
Possible completions are:
<keycap> <keycode>
<keycombo> <keysym>
Once you have started the tag of choice, you must close it. The easiest way to close an open tag is to use the keycombo Ctrl-c, followed by /. This will close the closest open tag you have.
Working with one window: Sometimes in Emacs the window becomes split (with tags completions or other text in the bottom window). The easiest way to get it back so that only your XML and text appear on one screen is to use the keycombo Ctrl-x, followed by 1.
Saving your work: To save your work, use the following keycombo, Ctrl-x followed by Ctrl-s.
The "clear/quit" command: I have found on some occasions that I have gotten too far into the tag completion process and need to just exit back out to my text. The easiest way to do this is the keycombo Ctrl-g. This command quits what you have been doing within the file, without quitting the file itself.
Opening a new file: To open a new file, use the keycombo Ctrl-x followed by Ctrl-f. At the bottom of the emacs window, you will be able to enter in the file name (using Tab completion if needed) of the file you wish to open.
Closing emacs: The easiest way to close emacs is to use the keycombo Ctrl-x followed by Ctrl-c. If you have not saved your work, it will prompt you to save the file, otherwise it will just quit the current emacs session you have been working with.