Command Prompt, Inc.
The Emacs menu

The Emacs menu

The SGML mode menu contains many of the same functions that are in the standard text mode menu. The following tables contain the most useful functions for creating SGML documents:

Table 2. Buffers menu

OptionDescriptionShortcut
 Lists all buffers currently in use. Click on the buffer you want to bring to the top (and make active).none

Table 3. The Files menu

OptionDescriptionShortcut
Open FileFind an existing file or open an new oneC-x-f
Save BufferSave a fileC-x-s
Save Buffer AsSave file under a new nameC-x-w
Insert FileInsert a file into current buffer at cursor positionC-x i
Kill Current BufferDelete the current buffernone
Make new FrameOpen a new windowC-x 5 2
Split WindowDivide window verticallyC-x 2
One WindowDelete all windows except the one marked by the cursorC-x 1
Exit EmacsSave all buffers and exitC-x-c

Table 4. The SGML menu

OptionDescriptionShortcut
Show ContextShow nesting of elements at cursor position (element1 in element2 in element3)C-c-c
What ElementShow where cursor is located (in what nested position)C-c-w
ValidateValidate the document with an SGML parserC-c-v
List Valid TagsShow tags that are valid at the cursor positionC-c-t
File OptionsChange settings for file handling (omit tag, indent, etc.)none
User OptionsAdd/remove optional warnings, autosave, etc.none

Table 5. The Modify menu

OptionDescriptionShortcut
NormalizeNormalize buffer by filling in omitted tags and expanding empty tags (this one is dangerous - it may add the wrong tags!)none
Make Character ReferenceConvert a character/symbol to it's ASCII representation preceded by & (will show the literal character/symbol in the document)C-c #
Unmake Character Referenceshould convert character reference back to the original character/symbol: however, it doesn't seem to work!none
Change Element NameReplace the name of the current element with a new nameC-c =
Edit AttributesChange attributes for the tag marked by the cursocurrent element's immediate tagC-c-a
Kill MarkupPlace cursor on left bracket of tag; command deletes the tagC-c-k
Kill ElementPlace cursor on left bracket of opening tag; command deletes the entire elementMeta-C-k
Untag ElementPlace cursor anywhere on element; removes tagsC-c -
Trim and Leave ElementMoves the tag(s) immediately following the cursor up to the same line as the cursorC-c-z

Table 6. The Move menu

OptionDescriptionShortcut
Next Trouble spotMove forward to next point where something is wrong with the structureC-c-o
Next Data FieldMove forward to next point where data is allowedC-c-d
Forward ElementMove cursor to beginning of current elementMeta-C-f
Backward ElementMove cursor to end of current elementMeta-C-b
Backward Up ElementMove backward out of the current element levelMeta-C-u
Beginning of ElementMove to after the start tag of the current elementMeta-C-a
End of ElementMove to before the end tag of the current elementMeta-C-e

Table 7. The Markup menu

OptionDescriptionShortcut
Insert ElementPlace cursor at location where new element is desired; the command shows a pop-up menu of all possible tags for that position; selection of a tag inserts the starting and closing tags for that elementnone
Insert Start-TagSame as for Insert Element, but places only the starting tag in positionnone
Insert End-TagPop-up menu shows all possible closing tags for the cursor positionnone
End Current ElementInserts a valid closing tag after the current elementC-c /
Tag RegionPlace cursor at start of element; selection of a tag from the pop-up menu will enclose the element within the selected tagsnone
Insert AttributePlace the cursor anywhere on an element; pop-up menus will allow you to add attributes to that particular elementnone
Insert EntityA pop-up menu provides a list of entities; selection places the entity at the cursor positionnone
Add Element to ElementA pop-up menu provides a list of tags; selection places both the starting and the closing tags at the end of an element marked by the cursor 

Table 8. The View menu

OptionDescriptionShortcut
Fold ElementHides the element (shows '...' in its place)C-c-f-e
Fold SubelementHides the elements in the content of the element marked by cursor (shows '...' in their places)C-c-f-s
Unfold LineRestores folded line to original conditionC-c-s
Unfold ElementUnfolds a folded elementC-c-u-e
ExpandUnfolds a folded regionC-c-f-x
Fold RegionHides all elements and tags in the region highlighted by clicking and dragging the cursor ( only '<region start tag>...' is displayed )C-c-f-r
Unfold AllUnfolds all folded elements in the documentC-c-u-a
Hide TagsHides all tags in the documentnone
Hide AttributesHides all attributesnone
Show All TagsRedisplays all hidden tagsnone

Table 9. The DTD menu

OptionDescriptionShortcut
Parse DTDFind tags/structure available for document typeC-c-p
Insert DTDSelect DTD from menu and insert into document. The following lines must be placed in the .emacs configuration file: (setq sgml-custom-dtd '( ("DocBook 3.1 Article" "<!DOCTYPE article PUBLIC \"-//OASIS//DTD DocBook V3.1//EN\">") ) )none
InfoProvides a detailed description of DTDs, elements, attributes, etc. 
Load Parsed DTDLoad a previously parsed DTD (may be faster than re parsing)none
Save Parsed DTDSave a DTD (to prevent having to parse it again later)none

Finally, there are two options from the Help menu that may be of use. The first option is Apropos Commands (C-h a. It's also accessible from the menu: Help->Describe->Apropos Commands),which lets you enter the name of a command. It will also show further details about using the command. The second option is Describe Buffer Modes (C-h m. Also accessible from the menu: Help->Describe->Describe Buffer Modes); it shows details about the current emacs mode.


Powered by Mammoth PostgreSQL
Copyright © 2000-2009 Command Prompt, Inc. All Rights Reserved. All trademarks property of their respective owners.